**Tell us what’s happening:**

The console.log of sumPrimes shows correct answers to all 3 tests, but the system says tests 2 and 3 failed.

**Your code so far**

```
let arrPrimes = [2];
function testPrime(num) {// NOT evenly divisible by any in arrPrimes
return arrPrimes.every(item => num % item != 0);
}
function sumPrimes(limit) {
let sum = 2;
let working = true;
let nextNum = arrPrimes[0]; // Start with highest prime so far.
while (working) { // While within limit,
nextNum++; // add 1 to testable number
if (nextNum > limit) { // We are done with sumPrimes:
working = false; // break out of both functions.
} else { // The number being tested is within limit, so
if (testPrime(nextNum)) { // is it a prime?
arrPrimes.unshift(nextNum); // Yep! Add as arrPrimes[0],
sum += arrPrimes[0]; // add it to the sum.
} // Not at next prime yet.
} // Process next higher number.
}
return sum;
}
console.log(sumPrimes(10));
```

```
**Your browser information:**
```

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`

.

**Challenge:** Sum All Primes

**Link to the challenge:**