JavaScript parseFloat()
JavaScript parseFloat()
The parseFloat() global method is used to parse a value as a string and returns the first number. If the first character cannot be converted, then NaN is returned.
Syntax:-
Its syntax is:- parseFloat(value)
Return:-
Its return is:- number and NaN if no number is found
Further Explanation:-
Parameter | Description |
value | Required. The value to parse. |