Remainder (%)

Airkit supports the standard division operator %. It is used to calculate what remains when one Number is divided by another.

Example

The following example shows how the remainder operator is used to calculate what remains of the Number 6 when it is divided by the Number 2. Note that it returns a another Number: 0, because 6 is neatly divisible by 2:

6 % 2 -> 0

Not all division is so neat. The following example shows how the remainder operator is used to calculate what remains of the Number 3 when it is divided by the Number 2:

3 % 2 -> 1

Last updated