Skip to content

Instantly share code, notes, and snippets.

@jlittlejohn
Created May 1, 2019 16:48
Show Gist options
  • Save jlittlejohn/d2bbfdf58dafe8edf9fa906745fb0a22 to your computer and use it in GitHub Desktop.
Save jlittlejohn/d2bbfdf58dafe8edf9fa906745fb0a22 to your computer and use it in GitHub Desktop.
JS: Array Filter Method Example
var anArray = [true, false, false, true, true, false];
var isTrue = example => {
return example;
};
var trueArray = anArray.filter(isTrue);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment