46
Modulo gives you the remainder after a division. If you share 7 pieces of suya between 2 people, each gets 3 and 1 is left over. 7 % 2 is 1.
We use this a lot to find out if a number is even or odd. If number % 2 is 0, it’s even! It’s a very handy little tool to have in your pocket.
Log in to add a comment.