Convert string to float

suggest change

parseFloat accepts a string and parses a leading floating-point number. It stops at the first character that cannot be part of that number, and returns NaN when the string does not start with a number.

parseFloat("10.01")    // 10.01
parseFloat("10.5abc")  // 10.5

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents