Skip to content

Instantly share code, notes, and snippets.

@kahunamoore
Forked from anonymous/arrayindexing.markdown
Created August 18, 2017 06:24
Show Gist options
  • Save kahunamoore/197614c38a640243ec95f26f28df03af to your computer and use it in GitHub Desktop.
Save kahunamoore/197614c38a640243ec95f26f28df03af to your computer and use it in GitHub Desktop.
ArrayIndexing
var myArray = [1, 5, 3, 42];
var index;
for (index = 0; index < myArray.length; index = index + 1) {
var item = myArray[index];
console.log("item[" + index + "] = " + item);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment