JSFiddle - React, Tailwind, and code Playground
by Bhesh Gurung
JavaScript
function isDefined(varName) {
if(typeof window[varName] === 'undefined') {
return true;
}
return false;
}
var hello1;
var hello2 = '';
alert('hello1' + isDefined('hello1'));
alert('hello2' + isDefined('hello2'));
alert('hello3' + isDefined('hello3'));