let x = 0;
Promise.resolve().then(() => { x = 1; });
// x is still 0 here β .then runs as a microtask.then callbacks are microtasks β they run after synchronous code completes.
.then() callbacks are executed asynchronously as microtasks. They run after synchronous code but before macrotasks.
Challenge: Verify that a .then callback does not run synchronously.