FrontendInterviews.dev

630. Promise.race First Settled

Easy•

Predict the output.

Promise.race([
  new Promise((resolve) => setTimeout(() => resolve('A'), 10)),
  Promise.reject('B')
]).then(console.log).catch(console.log)

What is the correct output/behavior?

Select an option and submit your answer.
Next Problem