Skip to content

Instantly share code, notes, and snippets.

@deleteman
Created July 17, 2019 15:38
Show Gist options
  • Save deleteman/f1fc7dd6666f75d6fc9d458953ec50ee to your computer and use it in GitHub Desktop.
Save deleteman/f1fc7dd6666f75d6fc9d458953ec50ee to your computer and use it in GitHub Desktop.
a = ["hello", "world"]
a.forEach ( (elem, idx, arr) => {
console.log(elem, "at: ", idx, "inside: ", arr)
})
/*
hello at: 0 inside: [ 'hello', 'world' ]
world at: 1 inside: [ 'hello', 'world' ]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment