allbeginnerconst 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([Promise.resolve(1)]) instanceof Promise is true.
Challenge: Verify the structural result.