Created
July 17, 2018 13:07
-
-
Save adamgiese/bed0cecaaba2e2143fed329a08b5c6fc to your computer and use it in GitHub Desktop.
Declarative Arrays: Divisible By 3 Filter
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
const numbers = [1,2,3,4,5,6,7,8,9]; | |
const divisibleByThree = numbers.filter(currentValue => currentValue % 3 === 0); | |
console.log(divisibleByThree); // [3,6,9]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment