Created
January 3, 2020 19:55
-
-
Save dorsev/2a30721a46ab517c3634a7bd54ed2b18 to your computer and use it in GitHub Desktop.
project-euler-solutions
This file contains 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
function multiplesOf3and5(number) { | |
return [...Array(number).keys()].filter((x) => { | |
if(x % 3 == 0 || x % 5 == 0){ | |
return x; | |
} else return 0; | |
}).reduce((agg,elem) => agg+elem, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment