JavaScript Number()
JavaScript Number()
The Number() global method is used for converting a value to a number. If the value cannot be changed, then it will return NaN.
Syntax:-
Its syntax is:- Number(value)
Return:-
Its return is:- value as a number else NaN
Further Explanation:-
Parameter | Description |
value | Optional. A JavaScript value of a variable. |