<! --start donate block -->
Support this site
If you like this work and find it useful, consider donating to support ads-free and high-quality education.
<! -- end donate block -->
In this chapter we’ll talk in detail about lexical environments — a mechanism used in some languages to manage the static scoping. In order to understand this concept completely, we’ll also discuss briefly the alternative — dynamic scoping (which though isn’t used directly in ECMAScript). We’ll see how environments help to manage lexically nested structures of a code and to provide complete support of closures. Continue reading