PDA

View Full Version : For what purpose NaN functioning used?



tony_S
01-28-2019, 02:21 AM
For what purpose NaN functioning used?

Sherin
04-26-2019, 01:14 AM
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

dennis123
05-27-2019, 01:09 AM
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.