// e.g. these would have been true with global isNaN()Number.isNaN('NaN'); // falseNumber.isNaN(undefined); // falseNumber.isNaN({}); // falseNumber.isNaN('blabla'); // falseNumber.isNaN([]) // false
isNaN(true); //false
isNaN(null); //false
isNaN(37); //false
isNaN('37'); //false: "37"is converted to the number 37 which isnot NaN
isNaN('37.37'); //false: "37.37"is converted to the number 37.37 which isnot NaN
isNaN('123ABC'); //true: parseInt("123ABC") is123 but Number("123ABC") is NaN
isNaN(''); //false: the empty string is converted to 0 which isnot NaN
isNaN(' '); //false: a string with spaces is converted to 0 which isnot NaN
isNaN(new Date()); //false
isNaN(new Date().toString()); //true// This is a false positive and the reason why isNaN isnot entirely reliable
isNaN('blabla'); //true: "blabla"is converted to a number.
// Parsing this as a number fails and returns NaN