Promise.resolve(5)
.then(n => {
n * 2;
})
.then(n => console.log(n));Promise.resolve(5)
.then(n => {
return n * 2;
})
.then(n => console.log(n));Bug: The first .then has no return statement — it returns undefined implicitly. The next .then receives undefined, not 10.
Explanation: Every .then that transforms a value must explicitly return it. Without return, the next handler in the chain receives undefined.
Key Insight: Always return from .then() when you need the value downstream. Missing return is the most common Promise bug.