Skip to content

Instantly share code, notes, and snippets.

@shilrobot
Created November 13, 2012 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shilrobot/4067554 to your computer and use it in GitHub Desktop.
Save shilrobot/4067554 to your computer and use it in GitHub Desktop.
LUA:
-- prints "nil"
print(undefined_var)
AS3:
// doesn't even compile, gives you "Access of undefined property" compiler error.
trace(undefined_var);
Note that for AS3 I'm NOT talking about an existing variable whose value is "undefined", which would be e.g.:
var x:* = undefined;
I'm talking about a variable that has never even been defined at all, i.e. no 'var' or 'const' statement anywhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment