Created
July 30, 2016 18:06
-
-
Save zeitan/97420d94a2e45aa186ad38da0b62a67f to your computer and use it in GitHub Desktop.
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 multiples3And5(number) { | |
var count = 0 | |
for ( var i = 1; i < number; i++) { | |
if (i % 3 == 0 || i % 5 == 0) { | |
console.log("multiple:" + i) | |
count += i | |
} | |
} | |
console.log("sum_multiiples:" + count) | |
} | |
multiples3And5(1000) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment