You’ve finished Timers, Callbacks and the Event Loop.
In This Course, You Learned How To
- Wait for slow work with timers, without freezing your program
- Predict when each callback runs, using the event loop
- Handle a result or an error with an error-first callback
- Notify several listeners with one event
- Run the laundry room at 14 Ferris Road
One Picture Behind Every Wait
Your script runs on the call stack, one thing at a time. Kofi’s reminder waits in the waiting area. When it’s due, it joins the task queue. The event loop moves it onto the stack only once the stack is empty.