Home > Article > Web Front-end > The difference between parseInt and parseFloat in javascript_javascript skills
Look at the code first:
Both methods parseInt() and parseFloat() start searching from the string on the left, if the first character is not a number or a negative sign (it can also be a decimal point in parseFloat()). Once they encounter such a character, they return the number they extracted