Skip to content

Instantly share code, notes, and snippets.

@nathan-lapinski
Created June 4, 2018 08:54
Show Gist options
  • Save nathan-lapinski/002d5cf632ec4c56992f3ef6038c008b to your computer and use it in GitHub Desktop.
Save nathan-lapinski/002d5cf632ec4c56992f3ef6038c008b to your computer and use it in GitHub Desktop.
Filtering arrays.
const arr = [1,2,3];
const filteredArr = arr.filter(v => v % 2 === 0); // [2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment