**Tell us what’s happening:**

I think it’s not good enough since i checked solutions and they are hard for me to understand. Is this okay to write the solutions the way i did?

**Your code so far**

```
function sumPrimes(num) {
let arr = 0
for (let i = 2; i<=num; i++) {
let check = []
for (let j = 2; j<=i; j++) {
if (i % j == 0) {
check.push(i)
}
}
if (check.length == 1) {
arr = arr + check[0]
console.log(arr)
}
}
return arr
}
sumPrimes(977);
```

**Your browser information:**

**Challenge:** Sum All Primes

**Link to the challenge:**