Created
April 26, 2022 18:28
-
-
Save MuddyBootsCode/885c2a5be17038752f9664d2ae56bd8f 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 multiplesOf3and5(number) { | |
let sum = 0; | |
for(let i = 0; i < number; i++){ | |
if(i % 3 === 0 || i % 5 === 0){ | |
sum += i; | |
} | |
} | |
return sum; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment