Like the += operator, -= subtracts a number from a variable.
+= operator
-=
myVar = myVar - 5;
will subtract 5 from myVar. This can be rewritten as:
5
myVar
myVar -= 5;
There was an error while loading. Please reload this page.
New to Free Code Camp?
JS Concepts
JS Language Reference
Other Links