← Back to Ruby Operators

Modulo Operator

The modulo operator (%) is used to return the remainder of a division operation.

10 % 3 # => 1

See the Ruby docs for details.