Navigator 3.0
Number.NaN
Number.NaN is a special value that indicates that the result of some arithmetic operation (such as division by zero) or mathematical function is "Not-a-Number." parseInt() and parseFloat() return this value when they cannot parse the specified string, and you might use Number.NaN in a similar way to indicate an error condition for some function that normally returns a valid number.
JavaScript prints the Number.NaN value as NaN. Note that the NaN value always compares unequal to any other number, including NaN itself. Thus, you cannot check for the Not-a-Number value by comparing to Number.NaN. Use the isNaN() function instead.
This HTML Help has been published using the chm2web software. |