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]( "How to check if a variable is an object")

Initial Title
Javascript check for undefined or null object/variable

Initial Tags

Initial Language