🔸[[Environment]]

the reference to the lexical environment where a function was created.

JSconceptsscopelexical environment[[Environment]]

All functions remember the lexical environment in which they were made.

  • every function has the hidden internal property named [[Environment]], that keeps the reference to the Lexical Environment where the function was created.

📗 JS.info ⟩ Lexical Environment

Last updated