Description
Converts strings into floating-point numbers.
Syntax
parseFloat(string)
Parameters
Returns
The parseFloat method returns an numerical value equal to the number contained in string. If no prefix of string can be successfully parsed into a floating-point number, NaN (not a number) is returned.
Example
parseFloat("abc") // Returns NaN.
parseFloat("1.2abc") // Returns 1.2.