Skip to content

Instantly share code, notes, and snippets.

@uyu423
Created December 17, 2019 05:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uyu423/d3565d35e185bf9c3c67a77b1d23e437 to your computer and use it in GitHub Desktop.
Save uyu423/d3565d35e185bf9c3c67a77b1d23e437 to your computer and use it in GitHub Desktop.
async function series do using array reduce
const array = [];
array.reduce((promise, payload) => {
return promise.then(() => {
// something await function do
});
}, Promise.resolve());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment