Possible Duplicate:
Javascript null or undefined
null
is a reserved word but not a keyword.
Hence it can not be over-written.
undefined
is a built in global that can be over-written. This is why you see jQuery re-define it in its IIFE. Just to make sure it was not over-written.
What it the technical distinction of when to use each as specified in ES 5.
I know that I have seen browsers set an un-created localStorage property to either null or undefined depending upon the browser.
localStorage.not_defined === null // sometimes
localStorage.not_defined === undefined // sometimes
How does ES 5 specify their usage in this case and in general?
ES5 provides not clarification:
8.1 The Undefined Type The Undefined type has exactly one value, called undefined. Any variable that has not been assigned a value has the value undefined.
8.2 The Null Type The Null type has exactly one value, called null.
http://www.ecma-international.org/publications/standards/Ecma-262.htm