javascript null vs undefined vs code example
Example 1: js null vs undefine
var TestVar = null;
alert(TestVar); //shows null
alert(typeof TestVar); //shows object
Example 2: js null vs undefine
var TestVar;
alert(TestVar); //shows undefined
alert(typeof TestVar); //shows undefined