Answers for "check if variable exists jquery"

15

javascript check if variable exists

if (typeof myVar !== 'undefined') {
    // myVar is defined
}
Posted by: Guest on July-23-2019
0

javascript check if variable is a jquery object

if (obj instanceof jQuery){
    console.log('object is jQuery');
}
Posted by: Guest on June-30-2020

Code answers related to "check if variable exists jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language