Chapter 6 - Challenges - Challenge 1 Source Code Fix

Hello guys! There is a logic mistake in the source code that comes along with the book, in the first challenge at chapter 6. Inside the function named isPrime the first control must be
if (number <= 1) {
return False

and not (number < 0).
That’s because number 1 is not a prime number.

1 Like

Thanks gharahousos. We’ll address that in our next update.