re: You make a good point, I hadn’t considered that actually! If I was to add this change it would just replace the conditional at the beginning of th...

It doesn't replace the conditional which checks if the number is even. That condition is still important.

Prime numbers are not even (except 2), so we don't have to check if they are divisible by even number.

Exactly, if you check the article, I added as much to the implementation section and tagged you with the kudos 😉

Nice! Thanks for tagging, it wasn't really needed. I just wanted to improve solution.

I always give credit where credits due so all good and thanks again for the comment 🙂👍.

Code of Conduct Report abuse