A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-116.js
1Promise.resolve('orig')
2.finally(()=>{thrownewError('fin');})
3.catch(e=>console.log(e.message));
Async
Answer & explanation
Console output
fin
Why
While .finally normally ignores its callback return value, throwing is the exception: if the callback throws (or returns a rejecting promise), that rejection replaces the original outcome. The fulfilled "orig" is discarded and the chain rejects with the thrown Error, so .catch logs "fin".