Skip to content
engineering workbench.by StudyPort Academy
All glossary terms

GLOSSARY · A WORD, UNPACKED

lexical scope

name lookup determined by where code is written, rather than by where a function is called.

A little more detail

A function looks in its own scope, then in the scopes surrounding its definition. A caller’s similarly named local variable does not replace that chain. This fixed relationship explains the outer bindings a closure can keep using.

See it in practice

These lessons pair the idea with examples you can change and run.