Recall & Review
beginner
What is a function execution context in JavaScript?
It is the environment where a function runs. It stores information like variables, parameters, and the value of
this while the function executes.Click to reveal answer
intermediate
What are the three main parts of a function execution context?
1. Variable Environment (stores variables and parameters)<br>2. Scope Chain (links to outer contexts)<br>3.
this value (context of the function call)Click to reveal answer
beginner
When is a function execution context created?
It is created every time a function is called, before the function code runs, and destroyed after the function finishes.
Click to reveal answer
intermediate
How does the scope chain affect variable access inside a function?
The scope chain lets the function access variables from its own context and from outer contexts, like the global scope or parent functions.
Click to reveal answer
advanced
What is the value of
this inside a function execution context?It depends on how the function is called. For example, in a regular function call,
this is undefined in strict mode or the global object otherwise. In methods, this is the object owning the method.Click to reveal answer
When is a new function execution context created in JavaScript?
✗ Incorrect
A new execution context is created each time a function is called to keep track of its variables and state.
Which part of the function execution context stores the function's parameters and local variables?
✗ Incorrect
The Variable Environment holds the function's parameters and local variables.
What does the scope chain in a function execution context do?
✗ Incorrect
The scope chain connects the current context to outer contexts to find variables.
What is the value of
this inside a regular function call in strict mode?✗ Incorrect
In strict mode,
this is undefined in regular function calls.What happens to a function execution context after the function finishes running?
✗ Incorrect
After the function finishes, its execution context is removed from the call stack and destroyed.
Explain what a function execution context is and what it contains.
Think about what the function needs to remember while it runs.
You got /4 concepts.
Describe how the scope chain works inside a function execution context.
Imagine looking for a variable inside nested boxes.
You got /3 concepts.