Help me with this code it already work for a small number but when i use a long one doesnt wokr

**Your code so far**

```
function sumPrimes(num) {
var number = [];
var second = [];
var last = [];
for(var i = 2; i < num; i++){
if(i % 2 !== 0 && i % 3 !== 0 && i % 5 !== 0 ){
number.push(i);
}
}
// // return last;
number = number.reduce(function(a, b){
return a + b;
});
return number +10;
}
sumPrimes(977);
```

**Your browser information:**

Your Browser User Agent is: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36`

.

**Link to the challenge:**

https://www.freecodecamp.org/challenges/sum-all-primes