puzzle 02 · javascript
What does this log?
console.log(typeof null, typeof NaN);"null" "number"
"object" "number"
"object" "NaN"
"undefined" "number"
why
typeof null is "object" — a bug from the first JavaScript implementation that can never be fixed without breaking the web. And NaN is a numeric value, so typeof NaN is "number".