How does Promise.all deal with promise resolution/rejection?

Question

Grade: Education Subject: Support
How does Promise.all deal with promise resolution/rejection?
Asked by:
60 Viewed 60 Answers

Answer (60)

Best Answer
(296)
Promise.all resolves to an array of the results of the promises, in the same order as the promises were passed in. If a promise rejects, Promise.all rejects with the rejection reason of that promise. If all promises resolve successfully, Promise.all resolves with an array of the resolved values.