Compound assignment operators are shorthand notations that combine an arithmetic operation with the assignment operator. They allow you to perform an operation and assign the result to a variable in a single step.
congrats on reading the definition of Compound Assignment Operators. now let's actually learn it.
+= operator: This operator adds the value on the right side of it to the variable on the left side, and then assigns the result back to that variable.
-= operator: This operator subtracts the value on the right side of it from the variable on the left side, and then assigns the result back to that variable.
*= operator: This operator multiplies the value on the right side of it with the variable on the left side, and then assigns the result back to that variable.