JS Built-ins
Promiseallbeginner

Promise.all([Promise.resolve(1)]) β€” instanceof

πŸ“– Usage Example
const p1 = Promise.resolve(1)
const p2 = Promise.resolve(2)
Promise.all([p1, p2]).then(values => {
  console.log(values) // β†’ [1, 2]
})

Promise.all() waits for all promises to resolve and returns their values as an array.

Promise.all() with Resolved Promise

Promise.all([Promise.resolve(1)]) instanceof Promise is true.

Challenge: Verify the structural result.

πŸ’‘ Hints (1)
  • β€’ Promise.all() wraps all results into a single Promise.