DevPath

Predict the order of async callbacks

Mid · fluency · 15 min · runtime js-node

Brief

Given a snippet mixing synchronous code, a microtask (Promise.then) and a macrotask (setTimeout), state the exact output order and explain why microtasks run before the next macrotask.

3 progressive hints are available in the editor.

Public checks

  • identifies microtasks — expected: mentions microtasks before macrotasks