For what purpose NaN functioning used?
For what purpose NaN functioning used?
Nan Function is used to determine whether its a number or not.
Nan stands for Not-a-Number.It returns true if its not a number and false if its a number.
Example: isNaN(123) returns false and isNan('Hi') returns true
The isNaN() function determines whether a value is an illegal number (Not-a-Number). This function returns true if the value equates to NaN. Otherwise it returns false. This function is different from the Number specific Number.isNaN() method.
|
Bookmarks