Possible Duplicate:
How to check for undefined or null variable in javascript
I want to check for an defined variable in javascript. Please see the following few examples and help me which is the best method to check 'a' for undefined (and check for nothing else) in Javascript?
one
if(a === undefined) { ... }
second
if(a === "undefined") { ... }
third
if(typeof a == "undefined") { ... }
last
if(a) { ... }