JavaScript Number isNaN()
JavaScript Number isNaN()
The Number.isNaN() method is used to return true if the value is NaN and the type is a Number else it will return false. NaN is a short form of Not-a-Number. It is an illegal number i.e, not a legal number.
The isNaN() method is used to return true if a value is Not-a-Number and it converts the value to the number before testing it.
Syntax:-
Its syntax is:- Number.isNaN(value)
Return:-
Its return is:- true if the value is Not-a-Number else false
Further Explanation:-
Parameter | Description |
value | Required. The value to be tested. |