DEV Community

Discussion on: Asynchronous loops in Javascript - using forEach, map, and for loop

Collapse
 
tomerl101 profile image
Tomer

Nice! you can use allSetteled instead of .all() which will not throw one error occouring.
Personally I prefer the classic for loop. more readable.

Collapse
 
anshuman_bhardwaj profile image
Anshuman Bhardwaj

Hi @tomerl101 , thanks for suggesting it. One of my collegue also suggested it after reading this post, and then I wrote this article explaining Promise methods

. I hope you'll find it helpful.