Thursday, July 5, 2018

D26 Basic #JavaScript: Compound Assignment With Augmented Multiplication


The *=operator multiplies a variable by a number.
myVar = myVar * 5;
will multiply myVarby 5. This can be rewritten as:
myVar *= 5;


Convert the assignments for ab, and cto use the *=operator.

No comments: