Hint
Order: sync → microtasks (Promise.then) → macrotasks (setTimeout). Microtasks always run before the next macrotask.
console.log('start');
setTimeout(() => console.log('timeout'), 0);
Promise.resolve().then(() => console.log('promise'));
console.log('end');start end promise timeout
Explanation: Sync runs first (start, end). Then microtask queue drains (promise). Then macrotask queue (timeout).
Key Insight: Order: sync → microtasks (Promise.then) → macrotasks (setTimeout). Microtasks always run before the next macrotask.