A special value representing Not-A-Number. This value is represented as the unquoted literal NaN.
Property of Number
Read-only
Description
MetaScript prints the value Number.NaN as NaN.
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 a function that should return a valid number.
Examples
In the following example, if month has a value greater than 12, it is assigned NaN, and a message is displayed indicating valid values.