Tag view

#event-loop

Cross-subject tag search for related interview cards.

Clear

Results update as you type. Press / to jump straight into search.

Tagged with event-loop

1 card

JavaScript Hard Theory

Event loop, Web APIs, callback queue, microtask queue, macrotask queue, promise queue, and setTimeout behavior

JavaScript's event loop decides when queued async work can return to the call stack, with microtasks running before the next macrotask.

  • The stack must be empty before queued work runs
  • Promise callbacks go to the microtask queue
  • `setTimeout` is a minimum delay, not an exact execution time

Event loop, Web APIs, callback queue, microtask queue, macrotask queue, promise queue, and setTimeout behavior