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
* Arithmetic Operator, *= Assignment Operator, + Arithmetic Operator, += Assignment Operator, - Arithmetic Operator, /= Assignment Operator, := Assignment Operator, Arithmetic Expressions, Arithmetic Operators, Assignment, Numeric Expressions, Precedence, precision Statement, Relational Operators, sum() Function, \= Assignment Operator