javascript check undefined variable

In javascript for check undefinded varaible you can use typeof() for get type of variable

 typeof(variable)

for an example

if(typeof(variable) == "undefinded")
    dostuff
else
    dostuff

Related posts:

This entry was posted in knowledge. Bookmark the permalink.