JS ⟩ concepts ⟩ scope ⟩ lexical environment vs. scope
(global/module/function/block) scope
is determined at compile-time.
is determined once and for all.
lexical environment
is created at runtime, every time a scope is entered❗
is repeatedly created/destoyed each time enters/leaves a scope.
scope
scope chain
execution context
Last updated 1 year ago