SyntaxFix
Write A Post
Hire A Developer
Questions
The remainder operator, %, will give you the remainder after dividing by a number.
So n % 2 == 0 will be true if n is even and false if n is odd.
n % 2 == 0