JSFiddle - React, Tailwind, and code Playground
JavaScript
function custom_isset() {
if (typeof(totally)!=='undefined'){
if (typeof(totally['inexistent'])!=='undefined') {
if (typeof(totally['inexistent'].property)!=='undefined') {
return true;
}
}
}
return false;
}
function is_it_set() {
alert("is it set?: "+(custom_isset() ? 'Yes' : 'No'));
}
is_it_set();
var totally = {inexistent:{'property':'foo'}};
is_it_set();