Skip to content

predict · queue

Four lines that log, and two queues.

Answer before anything runs. Then the machine runs it, and you can step through what it did.

const order = [];
order.push("first");
setTimeout(() => order.push("timer"), 0);
Promise.resolve().then(() => order.push("micro"));
order.push("second");