These are chat archives for **camperbot/bonfire-sum-all-primes**

`hint [1/8]`

Make sure you've tried to hard to solve it yourself before proceeding. :construction:

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]

`hint [2/8]`

submitted by Rafase282 | https://github.com/Rafase282

- FreeCodeCamp Profile: http://www.freecodecamp.com/rafase282
- CodePed Profile: http://codepen.io/Rafase282/
- LinkedIn: https://www.linkedin.com/in/rafase282

- Difficulty: 2/5

Sum all the prime numbers up to and including the provided number.

A prime number is defined as having only two divisors, 1 and itself. For example, 2 is a prime number because it's only divisible by 1 and 2. 1 isn't a prime number, because it's only divisible by itself.

The provided number may not be a prime.

Remember to use RSAP if you get stuck. Try to pair program. Write your own code.

```
function sumPrimes(num) {
return num;
}
sumPrimes(10);
```

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]

`hint [3/8]`

The explanation for this problem is very simple. You will generate a list of prime numbers up to the number you are given as a parameter. Then you need to add them all up and return that value. The tricky part is on generating the list of prime numbers. I suggest you find a code or a good math algorithm that you can turn into code.

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]

`hint [4/8]`

Generate a list of all the numbers up to and including the one you got as a parameter. This will be needed to determine which numbers are prime or not.

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]

`hint [5/8]`

Check this link if you prefer to find a solution for finding primes, or try learning and implementing your own Sieve of Eratosthenes

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]

`hint [6/8]`

This problem is hard if you have to create your own code to check for primes, so don't feel bad if you had to use someone's code for that bit. Either way, you are most likely using array, so once you generate an array of primes, then just add them all up and return the number you get.

type

`hint`

for next hint :pencil: [Contribute at the FCC Wiki]