Nan stands for "Not a Number". It's what is displayed when the answer isn't
a numeric value from the string you've given. It can't return a number - zero
for example - because that might have been the valid result of a conversion.
Instead it returns the special value NaN.
Note that this isn't the three-letter string "NaN". It's a special value in
Testing for NaN
Because NaN has no value it can cause some problems when you're testing the
NaN doesn't have a value. All we can say is that it's "Not a Number". Whatever
comparison you try you will get false as the answer.
The solution is to use the isNaN() function. This will return true if it's give
the value NaN as a parameter.