I’ve only been trying it in Firefox’s JavaScript console, but neither of the following statements return true:
parseFloat(\'geoff\') == NaN; parseFloat(\'ge
Use this code:
isNaN('geoff');
See isNaN() docs on MDN.
alert ( isNaN('abcd')); // alerts true alert ( isNaN('2.0')); // alerts false alert ( isNaN(2.0)); // alerts false