Skip to content

Instantly share code, notes, and snippets.

@dorsev
Created January 3, 2020 19:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dorsev/2a30721a46ab517c3634a7bd54ed2b18 to your computer and use it in GitHub Desktop.
Save dorsev/2a30721a46ab517c3634a7bd54ed2b18 to your computer and use it in GitHub Desktop.
project-euler-solutions
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