Level 1 — The basics
Increment, Decrement, and Compound Assignment
Original notes by SunDiaL · View English source
These operators are a combination of arithmetic operations and variable assignment. They are
- increment
++->x++is equivalent tox = x + 1 - decrement
--->x--is equivalent tox = x - 1 - increment by
+=->x+=2is equivalent tox = x + 2 - decrement by
-=->x-=2is equivalent tox = x - 2