Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save pfftdammitchris/7b3b563ed5a15324256c153ebe179352 to your computer and use it in GitHub Desktop.
Save pfftdammitchris/7b3b563ed5a15324256c153ebe179352 to your computer and use it in GitHub Desktop.
function forEach(arr, callback) {
for (let index = 0; index < arr.length; index++) {
const item = arr[index]
// The promise ends up here. But nothing else happens
callback(item)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment