Tell us what’s happening:
Your code so far
function multiplesOf3and5(number) {
// Good luck!
let sum = 0;
for(i=1; i<number;i++){
if(i%3==0 || i%5==0){
sum = sum+i;
}
}
return sum ;
}
multiplesOf3and5(1000);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.108 Safari/537.36.
Challenge: Problem 1: Multiples of 3 and 5
Link to the challenge:
https://www.freecodecamp.org/learn/coding-interview-prep/project-euler/problem-1-multiples-of-3-and-5