For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remainder

Syntax

x % y

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

16 % 16  // 0
17 % 16  // 1
18 % 16  // 2
-16 % 16 // 0

Last updated

Was this helpful?