What does Promise.race() resolve or reject with?

JavaScript Developer Medium

JavaScript Developer — Medium

What does Promise.race() resolve or reject with?

Key points

  • Promise.race() returns the result of the first settled promise
  • It does not wait for all promises to settle
  • The outcome can be either a fulfillment value or a rejection reason
  • Useful for scenarios where you only need the fastest response

Ready to go further?

Related questions