← Back to archive

Stdle #79 · async · 2026-08-18

What does this JavaScript snippet output?

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

Promise.resolve()
.then(() => { throw new Error('boom'); })
.catch(() => 'recovered')
.then(v => console.log(v));
Async
4 attempts left

Answer & explanation