A minimal mental model
The stack executes, queues wait and the loop coordinates.
- The call stack contains the functions executing right now.
- The task queue holds callbacks from timers, events and similar sources.
- The microtask queue holds promise reactions and `queueMicrotask()` callbacks.
- The event loop decides when queued work can move back onto the stack.