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