JavaScript » Constants » NaN

NaN means "Not-a-Number". It is used to signify that a value is not a legal number.

In ECMAScript, NaN is classified as a primitive value.
 
NaN means "Not-a-Number". It is used to signify that a value is not a legal number.
 
Note that the primitive value, Infinity, is used to signify that a number, 1.5x10321 for example, has exceeded the defined range of legal values for a floating point number in JavaScript.
 
You can use the isNan function to test a value to see if it is NaN.