Possible Duplicate:
Is there a standard function to check for null, undefined, or blank variables in JavaScript?
What is the best way to check undefined
type in javascript. I know 1 way to check for undefined type i.e. typeOf
. But i have to check if for lots of places, so if there is any short and better way to check then please let me know ?
I tried few ways but did`nt get success :
alert(undefined === "undefined");
alert(undefined || "defined");