How do I verify the existence of an object in JavaScript?
The following works:
if (!null) alert(\"GOT HERE\");
But this throws a
You could use "typeof".
if(typeof maybeObject != "undefined") alert("GOT HERE");