Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if set

if (typeof variable !== 'undefined') {
    // the variable is defined
}
//or
if (typeof variable === 'undefined') {
    // variable is undefined
}
 
PREVIOUS NEXT
Tagged: #javascript #check #set
ADD COMMENT
Topic
Name
8+8 =