Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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