Just out of curiosity.
It doesn\'t seem very logical that typeof NaN is number. Just like NaN === NaN or NaN == NaN returning
typeof NaN
NaN === NaN
NaN == NaN
Imagine We are converting a string to a number:
Number("string"); // returns NaN
We changed the data type to number but its value is not a number!