<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy" -->

---
title: JavaScript Promise Combinators: race(), all(),...
description: JavaScript offers four static Promise methods for handling multiple asynchronous operations at once: race(), all(), allSettled(), and any(). Promise.race()...
canonical: https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: JavaScript Promise Combinators: race(), all(), allSettled(), and any() | daily.dev
og:description: JavaScript offers four static Promise methods for handling multiple asynchronous operations at once: race(), all(), allSettled(), and any(). Promise.race()...
og:url: https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy
og:image: https://api.daily.dev/og/posts/s4D5Eweoy.png
og:image:alt: JavaScript Promise Combinators: race(), all(), allSettled(), and any()
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# JavaScript Promise Combinators: race(), all(), allSettled(), and any()

**[Medium](https://daily.dev/sources/medium_js)** · 7 min read · 4 upvotes · 0 comments

## Summary

JavaScript offers four static Promise methods for handling multiple asynchronous operations at once: race(), all(), allSettled(), and any(). Promise.race() settles as soon as any one promise settles, whether it fulfills or rejects. Promise.all() fulfills only when every promise fulfills, rejecting immediately if any one rejects. Promise.allSettled() waits for every promise to finish and reports each outcome, success or failure. Promise.any() fulfills on the first successful result and only rejects, with an AggregateError, if every promise rejects. Both all() and allSettled() preserve input order in their results.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://javascript.plainenglish.io/javascript-promise-combinators-race-all-allsettled-and-any-3f013d3807c2>

## Questions this post answers

### What is the difference between Promise.all and Promise.allSettled in JavaScript?

Promise.all rejects immediately if any single promise rejects, returning only a rejection reason. Promise.allSettled instead waits for every promise to finish regardless of outcome, then resolves with an array of objects like {status: 'fulfilled', value} or {status: 'rejected', reason} for each one, preserving input order.

_Picking between strict and lenient promise handling? daily.dev keeps async JavaScript patterns like these within reach._

### What is the difference between Promise.race and Promise.any in JavaScript?

Promise.race settles with whichever promise settles first, whether it fulfills or rejects. Promise.any instead waits specifically for the first fulfillment, ignoring rejections along the way, and only rejects with an AggregateError if every single input promise rejects.

_Debugging a race condition in async code? daily.dev surfaces explainers on JavaScript promise behavior like this._

### What happens when all promises passed to Promise.any() reject?

Promise.any() rejects with an AggregateError named 'All promises were rejected', whose errors property is an array containing the rejection reasons from every input promise in order, for example ['E1', 'E2'] when two promises reject with those reasons.

_Handling AggregateError edge cases? daily.dev keeps practical JavaScript promise references on hand._

## Similar posts on daily.dev

- [Promise.all vs allSettled vs race vs any](https://daily.dev/posts/promise-all-vs-allsettled-vs-race-vs-any-xfkanzqgv) · Flavio Copes · 3 upvotes · 0 comments
- [Mastering Parallel Data Fetching in Next.js: Combining Suspense, Promise.all, and Promise.allSettled](https://daily.dev/posts/mastering-parallel-data-fetching-in-next-js-combining-suspense-promise-all-and-promise-allsettled-oqhl1mozl) · Medium · 51 upvotes · 1 comments
- [JavaScript Async Lifetimes: Fix Your Leaking Code \(2026\)](https://daily.dev/posts/javascript-async-lifetimes-fix-your-leaking-code-2026--n2ucnhmvn) · Alex CloudStar · 2 upvotes · 0 comments
- [ES2025 Features You Should Actually Use](https://daily.dev/posts/es2025-features-you-should-actually-use-v4tpe3tjs) · The T-Shaped Dev · 13 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"JavaScript Promise Combinators: race(), all(), allSettled(), and any()","url":"https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy"},"datePublished":"2026-11-01T05:19:25.156Z","dateModified":"2026-11-01T05:20:08.316Z","description":"JavaScript offers four static Promise methods for handling multiple asynchronous operations at once: race(), all(), allSettled(), and any(). Promise.race()...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4dadbd745ee7680a27892d369eb3f21b?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/4dadbd745ee7680a27892d369eb3f21b?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Medium","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Medium","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/medium","url":"https://daily.dev/sources/medium_js"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Medium","item":"https://daily.dev/sources/medium_js"},{"@type":"ListItem","position":3,"name":"JavaScript Promise Combinators: race(), all(), allSettled(), and any()"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/javascript-promise-combinators-race-all-allsettled-and-any--s4d5eweoy#faq","mainEntity":[{"@type":"Question","name":"What is the difference between Promise.all and Promise.allSettled in JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Promise.all rejects immediately if any single promise rejects, returning only a rejection reason. Promise.allSettled instead waits for every promise to finish regardless of outcome, then resolves with an array of objects like {status: 'fulfilled', value} or {status: 'rejected', reason} for each one, preserving input order. Picking between strict and lenient promise handling? daily.dev keeps async JavaScript patterns like these within reach."}},{"@type":"Question","name":"What is the difference between Promise.race and Promise.any in JavaScript?","acceptedAnswer":{"@type":"Answer","text":"Promise.race settles with whichever promise settles first, whether it fulfills or rejects. Promise.any instead waits specifically for the first fulfillment, ignoring rejections along the way, and only rejects with an AggregateError if every single input promise rejects. Debugging a race condition in async code? daily.dev surfaces explainers on JavaScript promise behavior like this."}},{"@type":"Question","name":"What happens when all promises passed to Promise.any() reject?","acceptedAnswer":{"@type":"Answer","text":"Promise.any() rejects with an AggregateError named 'All promises were rejected', whose errors property is an array containing the rejection reasons from every input promise in order, for example ['E1', 'E2'] when two promises reject with those reasons. Handling AggregateError edge cases? daily.dev keeps practical JavaScript promise references on hand."}}]}
```

