Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check undefined or null

var myVar=null;

if(myVar === null){
    //I am null;
}

if (typeof myVar === 'undefined'){
    //myVar is undefined
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #undefined #null
ADD COMMENT
Topic
Name
7+5 =