The -= assignment operator decrements a variable by a numeric expression.
Syntax
var -= num.exp |
Example(s)
Subtracts 1 from the variable, x and assigns the result to x.
x -= 1 |
This statement:
total -= tax |
is equivalent to the statement:
total = total - tax |
See Also