.
Considering this, why NULL is an object in JavaScript?
The type of null is an “object”, which indicates that it must be an object. But that's not true. In fact, null is one of the primitive values in JavaScript. This is actually a bug in the language and unfortunately can't be fixed that easily, because it will break existing codebase.
Also, is an object null? According to the Java spec, null is a type that can be assigned to an object variable (as a value as noted in the comment). You cannot instantiate or create variables of this type though, you must use the literal null provided by the compiler. Absolutely not: null instanceof Object returns false.
Thereof, is null an object in JS?
In JavaScript null is "nothing". It is supposed to be something that doesn't exist. Unfortunately, in JavaScript, the data type of null is an object. You can consider it a bug in JavaScript that typeof null is an object.
Why is Typeof NaN a number?
The type of NaN , which stands for Not a Number is, surprisingly, a number. The reason for this is, in computing, NaN is actually technically a numeric data type. However, it is a numeric data type whose value cannot be represented using actual numbers.