A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-179.js
1Promise.resolve(2)
2.finally(()=>{return999;})
3.finally(()=>{})
4.then(v=>console.log(v));
Async
Answer & explanation
Console output
2
Why
Promise.prototype.finally always ignores the value its callback returns (unless it throws), passing the original settlement through unchanged. So returning 999 has no effect, and the original fulfilled value 2 survives both .finally steps to reach the .then.