Wednesday, March 14, 2012

Variables, Scoping and Hoisting

During this post, I relay my personal understanding of how variables are scoped and the effect hoisting has upon program execution for variables and functions in scope.

For brevity, I deliberately avoid discussion of execution context, "this" and the relationship to scoping. This will be an excellent topic for a future post.

You can try the examples using an online javascript interpreter.