Javascript Promise all() is an inbuilt function that returns the single Promise that resolves when all of the promises passed as the iterable have resolved or when an iterable contains no promises. The Promise .all() function can be useful for aggregating the results of the multiple promises. The Promise all() rejects with the reason of the first Promise that rejects or with the error caught by the first argument if that argument has caught the error inside it using try/catch/throw blocks.

Promise.all takes the Async operations to the next new level as it helps you to aggregate the group of  promises. In other words, we can say that it helps you to do concurrent operations.

Javascript Promise all example

Promises in JavaScript are one of the robust APIs that help us to do the Async operations.

Promise all() method rejects with a reason for the first Promise that rejects. There is no particular ordering in the execution of an array of Promises given.

On some computer systems, they may be executed in parallel or some sense concurrently, while on the other systems, they may be executed serially.

#javascript #javascript promise.all

The Definitive Guide on Javascript Promise.all()
1.20 GEEK