Actionscript: How to check if a variable is undefined?

September 10, 2009 Actionscript AS3 Flash Snippet
As null isn't the same thing as having a variable undefined. How then do you check if it's defined or not? Well, here's the answer:
if(!myVariable) {
trace("it's not defined");
}

Related posts: