Skip to content

Instantly share code, notes, and snippets.

@rubennorte
Created May 19, 2015 21:05
Show Gist options
  • Select an option

  • Save rubennorte/09fd260478f111c0e18d to your computer and use it in GitHub Desktop.

Select an option

Save rubennorte/09fd260478f111c0e18d to your computer and use it in GitHub Desktop.
Sequential promises
function executeSequentially(promises) {
return promises.reduce(function (result, promise) {
return result.then(promise);
}, Promise.resolve());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment