Skip to content

Promise APIs

JavaScript provides several static methods to work with multiple promises concurrently. Each serves a different concurrency pattern.

  • Know when to use each Promise combinator
  • Understand the difference between all, race, allSettled, and any
  • Handle errors appropriately for each method
MethodResolvesRejects
Promise.allWhen all fulfillWhen any rejects
Promise.raceWhen any settlesWhen any settles
Promise.allSettledWhen all settleNever
Promise.anyWhen any fulfillsWhen all reject