Skip to content

Challenge Assignment With Minus Equals

Quincy Larson edited this page Aug 20, 2016 · 1 revision

Challenge Assignment with Minus Equals

Like the += operator, -= subtracts a number from a variable.

myVar = myVar - 5;

will subtract 5 from myVar. This can be rewritten as:

myVar -= 5;
Clone this wiki locally