MediumEvent Loop & Promises💻 Output Question

Promise.reject caught by .catch — chain continues

💡

Hint

.catch can return a value to convert rejection back to fulfillment and continue the chain.

What does this output?

Promise.reject(42)
  .catch(v => v + 1)
  .then(v => console.log(v));

Correct Output

43

Why this output?

Explanation: .catch handles the rejection (v=42), returns 43. The chain continues — next .then receives 43.

Key Insight: .catch can return a value to convert rejection back to fulfillment and continue the chain.

More Event Loop & Promises Output Questions

EasySynchronous code runs before setTimeoutMediumPromise microtask before setTimeout macrotaskMediumPromise chain passes valuesHardTwo Promise chains interleave in microtask queue

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz