Skip to content

Instantly share code, notes, and snippets.

@diogocapela
Last active February 9, 2017 14:45
Show Gist options
  • Save diogocapela/6bee65c4e2a3308b4b2a96486f3fd912 to your computer and use it in GitHub Desktop.
Save diogocapela/6bee65c4e2a3308b4b2a96486f3fd912 to your computer and use it in GitHub Desktop.
My Solutions to Codewars Kata - 6kyu
My Solutions to Codewars Kata - 6kyu
function solution(number) {
var sum = 0;
for (var i = 0; i < number; i++) {
if (i % 3 === 0 || i % 5 === 0) {
sum = sum + i;
}
}
return sum;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment