Context and Environment
Execution Context and Lexical Environment
Last updated
Execution Context and Lexical Environment
Last updated
When java script engine sees the brackets, creates its own execution context inside the call stack, after the execution it will popes out the call stack.
Any time running the java scrip code, it will be a part of execution context.
when ever we run the java script code, it creates a Global execution context that gives global object 'window' and 'this' and this === window.
After the global execution context is created, functional execution context will be created.
Lexical is compile time.
Makes to know where the code is written.
Every function creates a new lexical environment.
Execution context says which lexical environment is currently running.
Lexical scope (available data + variables, where the function was defined) determines the available variables.
Where the function is called.