When you want to know if the variable is null then you can use :
if ( null == var ) // with type casting
if ( null === var ) // without type casting
When you want to check existance of variable you can use :
if ( typeof var != ‘undefined’ ) // Any scope
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment