Created
January 24, 2019 07:51
-
-
Save iamrommel/b8a061e5b4fe124ecf03f6dddc5c0e54 to your computer and use it in GitHub Desktop.
Sample of using for ... of loop in javascript to support the async await in sequence order
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
async function updateAllCustomer(customers) { | |
for (const customer of customers) { | |
await update(customer); | |
} | |
console.log('Done!'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment