Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if variable does not exist javascript

if (typeof variable === 'undefined') {
    // variable is undefined
    // eg:
    // var variable = "someValue";
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variable #exist #javascript
ADD COMMENT
Topic
Name
4+1 =