Sum All Primes (All numbers matter)

Tell us what’s happening:

I was calculating all the prime numbers that have 10, they are 1, 2, 3, 5, 7. But the sum of those numbers gives 18, not 17 as the challenge requests. Does that mean I shouldn’t add 1 or is there something wrong with this challenge? I think 1 should count.

I appreciate your help.

Your code so far

function sumPrimes(num) {
return num;


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36.

Challenge: Sum All Primes

Link to the challenge:

1 is not considered a prime number.
According to the definition of prime number:

A prime number (or a prime ) is a natural number greater than 1 that cannot be formed by multiplying two smaller natural numbers.

Okay, now I feel like an idiot. Anyway, thank you very much for your help.

Don’t feel like it, it’s an easy mistake to make :slight_smile:
Glad I could help,
happy coding :sparkle: