Assessment wanted for the Loops 3 skill test

Hello guys!

Could you tell me whether my bit of code is alright? It runs properly but the style might benefit from pointers.

Here is the link to my code: Loops3 exercise

Hi @Halden-Aratro and welcome to the community :wave:

Congratulations! This looks pretty good. :clap:
There’s one thing which would make the code simpler: Instead of using if (isPrime(i) === true) { you could just write if (isPrime(i)) {.

Additional question: How could you get rid of the last semicolon after “2”?

I hope that helps. :slightly_smiling_face:

Have a nice day,
Michael

1 Like