JavaScript data type and the Number isNaN
Number
- Number: integer and floating-point representation
- NaN: i.e. non-numerical (Not a Number) is a special value
Explanation
- Any operation (e.g., NaN / 10) relates to the return NaN NaN
- NaN is not equal to any value, including itself NaN
isNaN()
- Syntax: isNaN (n)
- Function: detecting whether the n "non-numerical"
- Return value: boolean
- Parameters: parameter n may be any type
Explanation
isNaN () value of the received, first try to convert a numerical value, and then detecting whether the non-numeric