1. What creates a new execution context in JavaScript?
- Block scope
- Function invocation
- Variable declaration
- Object creation
Reveal sample answer and explanation
Answer: Function invocation
Each function invocation creates a new execution context.
This JavaScript Extreme Hard Quiz is crafted for senior and expert-level developers. It focuses on deep JavaScript internals such as execution context, closures, prototypes, event loop, memory management, async behavior, edge cases, and real-world interview scenarios.
The question bank contains 46 questions. Your scored round uses up to 15 different questions. These samples are excluded from your round; try each one before opening its answer and explanation.
Answer: Function invocation
Each function invocation creates a new execution context.
Answer: They capture lexical scope
Closures retain access to their lexical scope.
Answer: object
This is a historical JavaScript bug.