Assessment Wanted for Loop 3

Here is the link to my
my code:

Thanks in advance

1 Like

Your code works as expected. Good job :+1:


As a personal remark, instead of always modifying the paragraph by default but not doing it when the number isn’t prime, like so:

for (...) {
  if(!isPrime(...)) {
    continue;
  }
  modifyText(...)
}

I would only modify the paragraph when the number is prime, like so:

for(...) {
  if(isPrime(...)) {
    modifyText(...)
  }
}

It’s a stylistic difference that might make your code clearer, but feel free to disagree :sweat_smile:.

2 Likes

Well noted! I do appreciate the feedback, but of course can’t disagree lol :joy: