A value representing Not-A-Number.
|Core Global Property|
NaN is a property of the global object, i.e. it is a variable in global scope.
The initial value of
NaN is Not-A-Number - the same as the value of Number.NaN.
Keep text below in sync with Number.NaN page
NaN is always unequal to any other number, including
NaN itself; you cannot check for the not-a-number value by comparing to
Number.NaN. Use the
isNaN function instead.
You might use the
NaN property to indicate an error condition for your function that returns a number in case of success.