← Back to archive

Stdle #27 · async · 2026-06-27

What does this JavaScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

Promise.resolve().then(() => console.log(1)).then(() => console.log(3));
Promise.resolve().then(() => console.log(2)).then(() => console.log(4));
Async
4 lines
4 attempts left

Answer & explanation