Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • What if num is equal to 1? Commented Aug 17, 2021 at 16:01
  • @Barmar false since 1 is not greater than1 Commented Aug 17, 2021 at 16:02
  • I was pointing out that your bullet items don't mention that case. Commented Aug 17, 2021 at 16:03
  • The question isn't clear, but I suspect the OP is really wondering why this comparison is used in the isPrime() function, not what it means as a JS operation. Commented Aug 17, 2021 at 16:04
  • @Barmar I have updated my answer definition. Commented Aug 17, 2021 at 16:17