Skip to content

Instantly share code, notes, and snippets.

@f1729
Created May 31, 2018 16:02
Show Gist options
  • Save f1729/beacab2a69a178f894c429bcc2083936 to your computer and use it in GitHub Desktop.
Save f1729/beacab2a69a178f894c429bcc2083936 to your computer and use it in GitHub Desktop.
function problem1(y) {
var mutiples = []; // Por si necesitamos mantener los numeros en un array
var adding = 0;
for (var number = 1; number < y; number++) {
if (number % 3 === 0 || number % 5 === 0) {
adding += number;
mutiples.push(number);
}
}
return adding;
}
problem1(1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment