Created
December 17, 2019 05:15
-
-
Save uyu423/d3565d35e185bf9c3c67a77b1d23e437 to your computer and use it in GitHub Desktop.
async function series do using array reduce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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