**why my code isn’t like it should ? i can’t find the bug ! help me please!**

**here is my code:**

```
function sumPrimes(num) {
let sum = 0;
let indi = 0;
for(let i = 2; i < num; i++){
for(let j = 1; j <= i; j++){
if(i % j == 0){
indi = indi + 1;
}
}
if(indi >= 2){
sum = sum + i;
}
}
return sum;
}
console.log(sumPrimes(10));
```

**Your browser information:**

User Agent is: `Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36`

.

**Challenge:** Sum All Primes

**Link to the challenge:**