nextRound
TechnologiesCoding ProblemsBookmarksLearning PathsLogin
nextRound
TechnologiesCoding ProblemsBookmarksLearning PathsLogin
nextRound

AI-powered interview preparation platform. Practice with curated questions, mock interviews, and personalized learning paths to crack your dream tech interview.

Quick Links

  • Technologies
  • Mock Interviews
  • Saved Questions
  • Pricing

Company

  • About Us
  • Contact Us

Legal

  • Privacy Policy
  • Terms of Use

© 2026 nextRound. All rights reserved.

Questions
1 of 8
1What is the Execution Context?
2List the types of Execution Context in JS.
3List the phases of the JavaScript Execution Context.
4What is the Call Stack?
5What is the difference between execution context and scope?
6How does the scope chain work internally?
7What is hoisting, and how does the engine implement it?
8How do closures work at the engine level?
javascriptjavascript
Basics
Engine
JIT
V8
Event Loop and Runtime
Concurrency and Threading
Bytecode and Parsing
Execution Context
Data Types
Functions
String Operations
Array Operations
this
Call Apply Bind
Closure
Objects
ES6 Classes
Events
ES6
Promises
Iterator and Generator
Error Handling
Web Workers
PWA
Web Sockets
Web Assembly
Garbage Collector
Modules
Browser APIS
Functional Programming
Currying
Higher Order Functions
Memoisation
Security
Code
Polyfills
01 / 08

What is the Execution Context?

Difficulty: 5/10
scope chain, this binding, call stack
  1. 1

    When the JavaScript engine scans a script file, it makes an environment called the Execution Context that handles the entire transformation and execution of the code.

  2. 2

    During the context runtime, the parser parses the source code and allocates memory for the variables and functions. The source code is generated and executed.

Scenario Questions

0-2 years experience

  1. 1If you write a simple function that logs a variable defined outside it, can you describe what execution context is created when the function runs and how the variable is resolved?
  2. 2What will be the value of `this` inside a regular function passed to `setTimeout`, and why does the execution context matter?

2-5 years experience

  1. 1You have a function that returns another function, and the inner function accesses a variable from the outer scope. During debugging you see unexpected values. Explain how the execution context and closure interact here.
  2. 2A teammate reports that a function works in the browser but throws a ReferenceError when run in Node. Walk me through how the different execution contexts could cause this.

5-8 years experience

  1. 1Our front‑end app suffers from memory leaks after navigating between pages. How would you investigate whether lingering execution contexts are the cause, and what strategies would you use to mitigate them?
  2. 2We need to refactor a large codebase to use ES modules instead of IIFEs. Discuss how the change in execution context affects `this` binding and the global scope, and what edge cases you’d watch for.

8+ years experience

  1. 1We are planning a migration from a monolithic JavaScript service to a micro‑frontend architecture. How would the shift in execution contexts across separate bundles influence shared state, and what patterns would you adopt to keep contexts isolated yet allow controlled communication?
  2. 2When designing a server‑side rendering pipeline that runs user‑provided scripts in a sandbox, how do you manage execution contexts to ensure security and performance, and what trade‑offs exist between using separate VMs versus a single shared context?

Follow-up Questions

  • What happens to the execution context when an async callback is queued and later executed?
  • How does strict mode change the this binding inside a function's execution context?
  • If an error is thrown inside a nested function, what does the call stack reveal about the active execution contexts?
Sharethis question

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.