Project Euler Problems 1 to 100 - Problem 1: Multiples of 3 or 5

i think there’s an error with this test
Failed:multiplesOf3Or5(1000) should return 233168.
it should return 234168 not 233168
please review and fix it
my code

function multiplesOf3Or5(number) {
  let sum = 0
  for(let i =3;i<=number;i++){
    if(i%3==0||i%5==0){
     sum += i
    }
  }
  return sum;
}


1 Like

Your code is not correct. The test is correct. Double check the wording, specifically the word ‘below’.

2 Likes

i<=number gives 234168 (it will add last number 1000 also)
i<number gives 233168 (it will neglect last number).