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
NaN is a number from a type point of view, but is not a normal number like 1, 2 or 329131. The name "Not A Number" refers to the fact that the value represented is special and is about the IEEE format spec domain, not javascript language domain.
NaN