I wanted to check whether the variable is defined or not. For example, the following throws a not-defined error
alert( x );
How can I cat
I've often done:
function doSomething(variable) { var undef; if(variable === undef) { alert('Hey moron, define this bad boy.'); } }