guess the output

one javascript snippet a day with a result that isn't what you'd expect. resets at midnight utc.

guess the output · daily

In what order do these log?

console.log("A");
setTimeout(() => console.log("B"), 0);
Promise.resolve().then(() => console.log("C"));
console.log("D");

every puzzle12

the whole bank, with the answer and the reason why.