Return to Tutorials index

download full size image (for printing)


In Javascript/Actionscript, the variable scope chain is intuitively the same as in Java (local variables inside methods are in scope, and then "global" variables, such as class instance/static variables.

However, in JS, the "global" variables are effectively, also properities of the global object (window in JS browsers, _global in AS). These same variables can also be accessed (from anywhere) via or etc.