Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js if variable is defined

if (typeof variable !== 'undefined') {
    // the variable is defined
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #variable #defined
ADD COMMENT
Topic
Name
8+7 =