For Example, Lets define a variable –
alert(a); // undefined
alert(typeof a); //undefined
As we can see in above example, variable a and typeof a is also undefined.
null – null means empty or non-existent value. Null can be assigned to a variable as a representation of no value.
null is primitive value not an object and can be assign to any variable. null returns typeof object but we can not add properties to it.
var a = null;
alert(a); // shows null
alert(typeof a); //shows object
null === undefined // false
null == undefined // true
null === null // true