These are all handy shortcuts to do a calculation on a variable, and then put the result back into the variable. + , - , * , / should be familiar. If you're wondering what % is, it's the modulus function.
Operator | Example | Equivalent to |
---|---|---|
+= | foo += 5 | foo = foo + 5 |
-= | foo -= 5 | foo = foo - 5 |
*= | foo *= 5 | foo = foo * 5 |
/= | foo /= 5 | foo = foo / 5 |
%= | foo %= 5 | foo = foo % 5 |