SyntaxFix
Write A Post
Hire A Developer
Questions
I have found that the easiest way to grasp the modulus operator (%) is through long division. It is the remainder and can be useful in determining a number to be even or odd:
4%2 = 0 2 2|4 -4 0 11%3 = 2 3 3|11 -9 2