First I've met this problem trying to make gimmick of bulk INSERT OR UPDATE into the same MySQL table. The Promise.All() function launched all database queries simultaneously what caused a dead lock on a table. Not the best practice I know. The good solution for this will be avoiding of numbers of similar queries, replacing it by one really bulk query. But that situation demanded the fast fix, not the right one. So, decision was to launch every next promise with DB query after completion of current one. In other words we need not to loop all the promises but chain them. Function Array.prototype.reduce() fit the best for our needs:

This function converts array of independent promises into the chain of these promises.

Pay attention on the second argument of reduce function - the initial accumulator. This is blank promise resolved with empty array. This blank promise gives us possibility to chain other promises using its then method. The resolved empty array is passed to the next chained promises, which push their results into it and passing the complemented array down the chain to next promises.

This is simple and elegant solution that provides possibility to run promises in series without being afraid of conflicts.