Skip to content

Instantly share code, notes, and snippets.

@MuddyBootsCode
Created April 26, 2022 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MuddyBootsCode/885c2a5be17038752f9664d2ae56bd8f to your computer and use it in GitHub Desktop.
Save MuddyBootsCode/885c2a5be17038752f9664d2ae56bd8f to your computer and use it in GitHub Desktop.
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