How do I verify the existence of an object in JavaScript?
The following works:
if (!null) alert(\"GOT HERE\");
But this throws a
You can use:
if (typeof objectName == 'object') { //do something }