re: A quick guide to JavaScript Promises VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Excellent article, I only have one suggestion. Avoid using either .forEach or .reduce for sequential promise execution - at least when overwriting...
 

Good point! I mainly wanted to explain how to handle it without the help of an additional tool in a still elegant solution. I think a recursive function wouldn't make it too readable. But yeah I agree that you should ideally use something that is a bit more sophisticated. Bluebird is certainly a good solution for this.

code of conduct - report abuse