🔰lexical environment
Last updated
Last updated
JS ⟩ concept ⟩ execution context ⟩ lexical environment
In JavaScript, every running function, code block {...}
, and the script as a whole have an internal associated object known as the "lexical environment", it consists of two parts:
environment record – an object that stores
all local variable(s) as its properties.
other information like the value of this.
A reference to the outer lexical environment (associated with the outer code).
📗 JS.info ⟩ Lexical Environment