-
-
Save diogocapela/6bee65c4e2a3308b4b2a96486f3fd912 to your computer and use it in GitHub Desktop.
My Solutions to Codewars Kata - 6kyu
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
My Solutions to Codewars Kata - 6kyu |
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 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