Skip to content

Instantly share code, notes, and snippets.

@Hebilicious
Created November 20, 2019 14:16
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 Hebilicious/bb93b01cd78bf6fd9bbdd30892cccb18 to your computer and use it in GitHub Desktop.
Save Hebilicious/bb93b01cd78bf6fd9bbdd30892cccb18 to your computer and use it in GitHub Desktop.
await for...of =>reduce
[1,2,3,4,5,6].reduce(async(previousPromise, thing) => {
await previousPromise
return asyncOperation(thing)
}, Promise.resolve())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment