Skip to content
JavaScript·Intermediate·Conceptual·1 min read

How is the call stack related to execution contexts?

Short interview answer

Calling a function creates and pushes a new execution context. Returning or throwing removes it, resuming the caller. The stack explains synchronous control flow; asynchronous callbacks create later calls rather than leaving the original function frame suspended.

Key takeaway

Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.

← Back to Execution context

Related questions