Tell us what’s happening:
Please any help how to fix this! How to give me the right number when i check 977?
Your code so far
function sumPrimes(num) {
var numb = [];
var last = [2];
for(var i = 1; i< num; i++){
numb.push(i);
}
for(var x = 2; x< numb.length; x++){
if(x%2 == 1){
last.push(x);
}
}
return last;
}
sumPrimes(10);
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36.
Link to the challenge:
https://www.freecodecamp.org/challenges/sum-all-primes