MediumEvent Loop & Promises💻 Output Question

Promise chain passes values

💡

Hint

Promise chains pass return values downstream. Each .then transforms the value.

What does this output?

Promise.resolve(2)
  .then(v => v * 3)
  .then(v => v + 4)
  .then(v => console.log(v));

Correct Output

10

Why this output?

Explanation: Each .then receives the return value of the previous. 2*3=6, 6+4=10.

Key Insight: Promise chains pass return values downstream. Each .then transforms the value.

More Event Loop & Promises Output Questions

EasySynchronous code runs before setTimeoutMediumPromise microtask before setTimeout macrotaskHardTwo Promise chains interleave in microtask queueMediumawait suspends function — caller continues

Practice predicting output live →

66 output questions with instant feedback

💻 Try Output Quiz