Why Using reduce() to Sequentially Resolve Promises Works

Writing asynchronous JavaScript without using the Promise object is a lot like baking a cake with your eyes closed. It can be done, but it’s gonna be messy and you’ll probably end up burning yourself.
I won’t say it’s necessary, but you get the idea. It’s real nice. Sometimes, though, it needs a little help to solve some unique challenges, like when you’re trying to sequentially resolve a bunch of promises in order, one after the other. A trick …
The post Why Using reduce() to Sequentially Resolve Promises Works appeared first on CSS-Tricks.

Link: https://css-tricks.com/why-using-reduce-to-sequentially-resolve-promises-works/