On this page
  1. Promise.all
  2. Signature & Overview
  3. Notes & Pitfalls
  4. Example

Promise.all

Prev: Promise | Up: Promise | Next: allSettled
Rel: Promise, Promise & Async Guide
Ref: MDN Web Docs — Promise.all
Tags: #public #web #javascript #builtins #promise #tier/core


Signature & Overview

Promise.all(iterable)

Fulfills with an array of all values when every promise fulfills; rejects immediately on the first rejection.

Notes & Pitfalls

Example

const [a, b] = await Promise.all([Promise.resolve(10), Promise.resolve(32)]);
console.assert(a + b === 42);

Linked from

Related notes