```
function sumPrimes(num) {
var start = 2;
var check = Math.sqrt(num);
var answer = [];
if ( num == start)
{
answer.push(num);
sum_primes(answer);
}
while(start <= check)
{
if(check%start === 0)
{
//do nothing and only increment the counter
start++;
}
else
{
answer.push(start);
}
}
sum_primes(answer);
}
function sump_primes(answer)
{
var sum = 0;
for(i=0;i<=answer.length;i++)
{
sum = sum + answer[i];
}
}
sumPrimes(10);
```

can someone please check as to where exactly the code is wrong.

TIA