Assignment Operators

Format:

variable assignOp expression
Some Assignment Operators
operator action
= assigns the value of expression to the variable; old value of the variable gone.
+= adds value of expression to the variable; old value of the variable gone.
-= subtracts value of expression from the variable; old value of the variable gone.
*= multiplies variable by the value of the expression; old value of the variable gone.
/= divides variable by value of expression; old value of the variable gone.
%= puts into the variable the remainder of dividing the variable by the expression; old value of the variable gone.