Skip to content

Instantly share code, notes, and snippets.

@Chuloo
Created January 27, 2019 23:30
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 Chuloo/0e6381867dc2f3032df19ff9d121bc11 to your computer and use it in GitHub Desktop.
Save Chuloo/0e6381867dc2f3032df19ff9d121bc11 to your computer and use it in GitHub Desktop.
List items over an array index
// Create array of continents
const places = ['Africa', 'Asia', 'Europe', 'Australia'];
// Filter array for continents beyond the array index of 1
const overIndex = places.filter(function(place, index){
return index > 1;
})
// Display new Array
console.log(overIndex);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment