Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if undefined

let myVar;

if (myVar === undefined){}
  //!! Note: myVar == undefined would also check wether myVar is null 

//alternatively
if (typeof myVar === 'undefined'){ }
Source by www.tutorialrepublic.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #undefined
ADD COMMENT
Topic
Name
9+9 =