-
Promise.all()
- Executes promises in parallel.
- Waits for all promises to resolve.
-
If any one promise fails, it immediately rejects
and throws that error.
- Returns an array of resolved values (if successful).
-
Promise.allSettled()
- Executes promises in parallel.
-
Waits for all promises to finish — regardless of
success or failure.
- Never rejects; always resolves with an array of results.
-
Each result object contains:
{ status: "fulfilled", value } or
{ status: "rejected", reason }.
-
Promise.race()
- Executes promises in parallel.
-
Resolves or rejects
as soon as the first promise settles (either
success or failure).
- Does not wait for other promises once one settles.
- Useful when you only care about the fastest result.
-
Promise.any()
- Executes promises in parallel.
-
Resolves as soon as the first promise fulfills.
-
If all promises reject, it rejects with an
AggregateError.
-
Ignores any rejected promises until at least one resolves
successfully.