Null type is only one value ,just is null.It is used to indicate a not exist object.Commonly used to express a not exist object function attempts to return .
Undefined type is also only one value ,just is undefined.When a declared variable is not been initialized, the default value of the variable is undefined.
alert(Value1 == undefined);
The code will output true.It mean the value of Value1 is undefined because we have not initialized Value1.
alert(null == document.getElementById('notExistElement'));
When DOM node id of "notExistElement" is not exist on the page, the code will output true, because we try to obtain a non-existent object.
alert(null == undefined);
ECMAScript consider undefined is derived from null so this code will output true.But how can we distinguish the two types?We can use the two ways following.
alert(null === undefined);
alert(typeof null == typeof undefined);
Both of them will output false.The types of them are different so it outputs false.
This address is http://www.computerites.com/web-design-skills/2012/12/differences-between-null-and-undefined-in-java-script-625.html