I believe this would wait for each promise to resolve before moving onto the next loop.
The Promise.all() solution allows each async call to happen async concurrently; only moving on once all promises resolve (regardless of the order in which they resolve).
2
u/justrhysism May 29 '19
I believe this would wait for each promise to resolve before moving onto the next loop.
The
Promise.all()solution allows each async call to happen async concurrently; only moving on once all promises resolve (regardless of the order in which they resolve).