Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if null

if (variable === null) { //Executes only if variable is null but not undefined
  //Code here
}

if (variable == null) { //Executes if variable is null OR undefined
  //Code here
}
 
PREVIOUS NEXT
Tagged: #javascript #check #null
ADD COMMENT
Topic
Name
3+8 =