Skip to content

Instantly share code, notes, and snippets.

@benjamin658
Last active December 21, 2020 09:28
Show Gist options
  • Save benjamin658/55ea3c9f907d9e2dc6647a5ef67eff08 to your computer and use it in GitHub Desktop.
Save benjamin658/55ea3c9f907d9e2dc6647a5ef67eff08 to your computer and use it in GitHub Desktop.
Promise in sequence
const promises = []; // an array of promises.
promises.reduce((prev, next) => prev.then(next), Promise.resolve());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment