Created
May 1, 2019 16:48
-
-
Save jlittlejohn/d2bbfdf58dafe8edf9fa906745fb0a22 to your computer and use it in GitHub Desktop.
JS: Array Filter Method Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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