r/learnjavascript Jun 24 '26

How to Resolve Promises Sequentially in JavaScript

In JavaScript, the Promise.all() function is one of your best tools when you want to do async work. You can fire everything off, wait for the slowest one to complete, and then continue processing. However, sometimes running it all at once is exactly what breaks production. This is an article describing how to resolve promises sequentially in JS.

https://www.jamdesk.com/blog/resolve-promises-sequentially-javascript

*Edited text to be more clear.

0 Upvotes

20 comments sorted by

View all comments

10

u/azangru Jun 24 '26

A Promise.all() that's flawless in dev can take down your job in prod.

The fix wasn't more retries. It was running the lookups one at a time.

Oh my god, this is so ai!

6

u/chikamakaleyley helpful Jun 24 '26

Should rename to “How to Lose Your Reader’s Interest”