What is the Difference between Undefined, undeclared, Null
// undefined means that the variable has not been declared, or has not been given a value.
// Undefined is used for unintentionally missing values.
var dog;
console.log(dog);
// Undeclared means the variable does not exist in the program at all.
console.log(cat);
// Null used for intentionally missing values. It contains no value.
null is a special object because typeof null returns 'object'.
On the other hand,
undefined means that the variable has not been declared,
or has not been given a value.
Undefined used for unintentionally missing values.
Null used for intentionally missing values.
null == undefined