The modulus operator (%) yields the remainder of a division operation.
Example
let x = 5; let y = 2; let z = x % y; |
In arithmetic, dividing two integers results in both a quotient and a remainder. In mathematics, the outcome of a modulo operation represents the remainder after performing an arithmetic division. |
The increment operator (++) increases numbers by one.
Example
let x = 5; x++; let z = x; |