
Asad I. answered 01/01/20
Experienced Javascript, php, html and React Native Tutor.
Hi Chris,
I hope its not too late.
In order to find whether a number is even or odd, you use the modulus (%) operator. e.g if i mod 2 gives zero, it means i is even. The mod x % y is used to Divides the left hand operand by the right hand operand and returns remainder. Remainder of even number divided by 2 will always return 0.