A test does not work while another does. This code with the argument 10 works, but not with 977. The factors of num appear as num on the high number. This might be due to lack of memory. I tried making the second loop condition i < (num/2) without entirely understanding it, and that failed. I am looking for problems.

```
function sumPrimes(num) {
let countup = [];
for (let i = 2; i <= num ; i++) {
countup.push(i);
}
let factors = [];
for (let i = 0; i < countup.length; i++) {
if (num % countup[i] == 0) {
factors.push(countup[i]);
}
}
let sum = factors.reduce((accumulator, currentValue) => {
return accumulator += currentValue;
}
);
console.log(factors);
return sum;
}
sumPrimes(977);
```

User Agent is: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36 Edg/88.0.705.63`

.

**Challenge:** Sum All Primes

**Link to the challenge:**