Category: Number function
This function returns the remainder of the quotient of two numbers.
|dividend||Number||The value being divided.|
|divisor||Number (non-zero)||The value the divident is being divided by.|
Return value type: Number (Integer)
This function performs division much as the expression dividend / divisor would, except that only the remainder of the division, if there is any, is returned as a whole number.
rem(12,4) //Returns 0
rem(15,3) //Returns 0
rem(21,5) //Returns 1 (Remainder only returned as a whole number.)
rem(-14,5) //Returns -4 (Remainder only returned as a whole number.)