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
}
 
PREVIOUS NEXT
Tagged: #javascript #check #undefined #null
ADD COMMENT
Topic
Name
6+8 =