Return to Snippet

Revision: 26497
at April 29, 2010 06:00 by PapillonUK


Initial Code
if(typeof(myVar) == "undefined")

Initial URL

                                

Initial Description
You can use if(!myVar) which will return True if a variable is undefined OR zero, but this method specifically checks for undefined.

Initial Title
Check for undefined var

Initial Tags

                                

Initial Language
JavaScript