What is the call stack in JavaScript?
A LIFO data structure that tracks which function is currently running. Each function call pushes a frame, each return pops one. Only one function runs at a time.
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in JavaScript Call Stack Basics for Beginners
Infinite or very deep recursion. Each call adds a frame to the stack without popping one, until the engine's maximum stack size is exceeded and a RangeError is thrown.
No. JavaScript is single-threaded, so the call stack has one active frame at a time. Other functions must wait for the current one to return.
Only when the call stack is empty. The event loop checks the stack, and if it is empty, it moves callbacks from the microtask queue (then macrotask queue) onto the stack.
Still have questions?
Browse all our FAQs or reach out to our support team
