Skip to content

Instantly share code, notes, and snippets.

@iamrommel
Created January 24, 2019 07:51
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 iamrommel/b8a061e5b4fe124ecf03f6dddc5c0e54 to your computer and use it in GitHub Desktop.
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
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