GLOSSARY · A WORD, UNPACKED
scope
the area of your code where a particular variable is visible and usable.
A little more detail
A declaration belongs to a scope, such as a block, a function, or a module. Code can look outward through its surrounding scopes, but cannot reach into another function’s private local names. If an inner scope declares the same name, that nearer declaration hides the outer one there. Closures preserve access to the surrounding bindings of a function’s definition, even when the function runs later.
See it in practice
These lessons pair the idea with examples you can change and run.