Skip to content

Instantly share code, notes, and snippets.

@wiedymi
Created October 21, 2019 08:15
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 wiedymi/1e579021be1bd2509ac9ee319db6f336 to your computer and use it in GitHub Desktop.
Save wiedymi/1e579021be1bd2509ac9ee319db6f336 to your computer and use it in GitHub Desktop.
async function asyncForEach(array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment