Answers for "jquery check variable exists"

19

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 "jquery check variable exists"

Code answers related to "Javascript"

Browse Popular Code Answers by Language