Skip to content

Modulo Assign Operator

IsaacShelton edited this page Mar 21, 2022 · 1 revision

%= Operator

The %= operator is used for performing the modulo operation on two numeric types and storing the resulting value in the first.

x %= 3

It can only be used as a statement, and the first operand must be mutable.

Clone this wiki locally