Last active
May 7, 2018 11:56
-
-
Save olddustysocksunderthecouch/3bec96c5338853ea6f247edc38f202af to your computer and use it in GitHub Desktop.
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
let arr = [1,2,3,4,5,6]; | |
let even = arr.filter(element => { | |
return element % 2 === 0; | |
}); | |
// Result: even = [2,4,6] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment