Remainder

Syntax

1
x % y
Copied!

Explanation

The remainder operator returns the remainder left over after division of the two operands. The sign of the dividend is taken rather than the divisor making it different from a modulus function.

Examples

1
16 % 16 // 0
2
17 % 16 // 1
3
18 % 16 // 2
4
-16 % 16 // 0
Copied!
Last modified 1yr ago
Copy link