console.log(typeof null) //object
console.log(null instanceof Object) //false
We all know that value
null represents intentional absence of any object value.
typeof would return a string, hence
null is absence of value, it implies it cannot be instance of anything, hence
instanceof returns a
console.log(typeof NaN) //Number
console.log(NaN === NaN) //false
NaN is a number from data type point of view.
NaN is never equal to
NaN, as each
NaN is unique unknown number.