GLOSSARY · A WORD, UNPACKED
execution context
the environment JavaScript sets up to run a piece of code, tracking that moment's variables, scope, and `this`.
A little more detail
When a script, module, or function begins executing, the engine needs to know which code is active, which bindings it can look up, and what its current this rules are. An execution context groups that execution information. Function calls add active contexts to the call stack; returning removes them from the active stack. A closure can keep access to lexical bindings after the creating call has returned, so “no longer executing” does not mean “all its retained data is gone.” An execution context is an engine model, not an ordinary object your program can query directly.
See it in practice
These lessons pair the idea with examples you can change and run.