Created
May 20, 2018 16:03
-
-
Save RoseCrime/85d379319b5af7a6fcd4d626554cc59c to your computer and use it in GitHub Desktop.
Filter method
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 vals = [1, 3, 65, 7, 3, 2, 6, 75, 3, 42, 12, 312, 23] | |
vals = vals.filter(num =>!(num % 2)) | |
/*vals = vals.filter(num =>num % 2 == 0)*/ | |
//same thing | |
console.log(vals); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment