let order = [];
new Promise(resolve => { order.push(1); resolve(); })
.then(() => order.push(3));
order.push(2);
// order is [1, 2] β then handler has not run yetThe Promise executor runs synchronously; .then handlers run asynchronously.
The executor function runs synchronously, but .then() handlers run asynchronously as microtasks.
Challenge: Verify the execution order: executor sync, then handler async.