Loading topic
setTimeout is easy to reason about: it asks the host to queue a task later. The delay you pass sets the earliest time that task can join the queue. It never 2 min readPromise.then usage.2 min readthen, catch) and have read the previous chapter on the microtask queue. You will see exactly when a promise callback gets queued, and why chained callbacks from different promises take turns.2 min readasync/await syntax, how .then() callbacks work, and the microtask queue from the previous chapters. The goal is to see await for what it is: a way to split one function into pieces, with each later piece scheduled as a microtask.2 min readawait resumes its function as a microtask. Here those pieces become a single method you can use to trace any snippet that mixes synchronous code, timers, promises, and async functions2 min readnode file.js.2 min readprocess.nextTick runs sooner than setImmediate, which does not run "immediately" at 2 min readsetTimeout, promises, and queueMicrotask.2 min read