Return to Snippet

Revision: 13655
at April 30, 2009 16:44 by jasonseney


Initial Code
if(typeof(foo) !== 'undefined' && foo != null) {
    //you can use foo!
}

Initial URL

                                

Initial Description
Based on some comments in [StackOverflow Question](http://stackoverflow.com/questions/95875/javascript-check-to-see-if-a-variable-is-an-object "How to check if a variable is an object")

Initial Title
Javascript check for undefined or null object/variable

Initial Tags
javascript

Initial Language
JavaScript