typeof null returns "object", a bug from the very first JavaScript implementation that can never be fixed without breaking the web. NaN is a numeric value (the result of invalid math) so its type is "number". Arrays are objects, so typeof [] is "object" (use Array.isArray to detect them). Functions are the one callable subtype typeof reports specially as "function".