metavoid
10/5/2017 - 11:53 PM

syncPromiseRun.js

let itemIDs = [1, 2, 3, 4, 5];

itemIDs.reduce((promise, itemID) => {
  return promise.then(_ => doSmth());
}, Promise.resolve());