Check if variable exists in js Dec 27, 2020 Here’s the table of contents: Use typeof to check if variable exists Use typeof to check if variable exists if (typeof this.actualSelection !== 'undefined') { // the variable actualSelection is defined console.log("actualSelection is defined") } See!