Hello,

Sum All Primes

So bad, my code doesn’t works with 977, why ?

```
function sumPrimes(num) {
let maxMultiple = Math.floor(Math.sqrt(num));
console.log(maxMultiple)
let multiples = [];
for (let m = 2; m <= maxMultiple; m++) {
multiples.push(m)
}
//console.log(multiples)
let numbers = [];
for (let n = 2; n <= num; n++) {
numbers.push(n);
}
//console.log(numbers)
for (let i = 0; i < multiples.length; i++) {
let multi = multiples[i];
for (let j = numbers.indexOf(Math.pow(multi, 2)) ; j < numbers.length; j += multi) {
numbers.splice(j, 1, 'false')
}
}
console.log(numbers)
console.log(numbers.filter(item => Number.isInteger(item)).reduce((a, b) => a + b, 0))
return numbers.filter(item => Number.isInteger(item)).reduce((a, b) => a + b, 0);
}
sumPrimes(977);
```