Possible Duplicates:
Javascript: undefined !== undefined?
What is the best way to compare a value against 'undefined'?
I've played around with the console and got some strange results when checking undefined,
when I do var a; a's type and value become "undefined" right?
So why a===undefined is true and a=="undefined" or a==="undefined" are false?
and, would typeof a == "undefined" be the best practice like in other languages?
Unrelated - how do I markup code in a question from iPhone?