JS Built-ins
AsyncPatternsbeginner

Promise.all returns Promise

πŸ“– Usage Example
const result = await Promise.all([Promise.resolve(1), Promise.resolve(2)]);
// [1, 2]

Promise.all() waits for all promises to resolve; rejects if any one fails.

Promise.all()

Promise.all() combines multiple Promises into a single Promise.

Challenge: Verify that Promise.all() returns a Promise instance.

πŸ’‘ Hints (2)
  • β€’ Promise.all() always returns a Promise.
  • β€’ It waits for all input Promises to settle.