I’ve only been trying it in Firefox’s JavaScript console, but neither of the following statements return true:
parseFloat(\'geoff\') == NaN; parseFloat(\'ge
Simply convert the result to String and compare with 'NaN'.
var val = Number("test"); if(String(val) === 'NaN') { console.log("true"); }