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).
1
u/tjb1019 May 29 '19
i like to use the for...of loop in this type of situation. seems like the cleanest syntax of all the options.