fix: sum all primes description (#37750)
* fix: sum all primes description * Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * Update curriculum/challenges/english/02-javascript-algorithms-and-data-structures/intermediate-algorithm-scripting/sum-all-primes.english.md Co-Authored-By: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
@ -8,9 +8,14 @@ forumTopicId: 16085
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
<section id='description'>
|
<section id='description'>
|
||||||
Sum all the prime numbers up to and including the provided number.
|
|
||||||
A prime number is defined as a number greater than one and having only two divisors, one and itself. For example, 2 is a prime number because it's only divisible by one and two.
|
A <dfn>prime number</dfn> is a whole number greater than 1 with exactly two divisors: 1 and
|
||||||
The provided number may not be a prime.
|
itself. For example, 2 is a prime number because it is only divisible by 1 and 2. In
|
||||||
|
contrast, 4 is not prime since it is divisible by 1, 2 and 4.
|
||||||
|
|
||||||
|
Rewrite `sumPrimes` so it returns the sum of all prime numbers that are less than or
|
||||||
|
equal to num.
|
||||||
|
|
||||||
Remember to use <a href='https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.
|
Remember to use <a href='https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514' target='_blank'>Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user