undefined vs. null in JavaScript

JavaScript distinguishes "undefined" and "null" in something of the way that ~unset~ and NULL are distinct. An undefined variable is one you haven't assigned yet, NULL is one you've set to NULL.

// Chrome Console Session
> asdf
VM66:1 Uncaught ReferenceError: asdf is not defined

> typeof asdf
<- "undefined"

> asdf = null
<- null

> asdf
<- null

> typeof asdf
<- "object"

(If you're curious why the typeof null is an object in JavaScript: "Because the spec says so. This is generally regarded as a mistake.". The move of not having an answer for the value of the type, e.g. saying the answer to type of null is null - is much better)