July 2018
Beginner
552 pages
13h 18m
English
As you just saw in the variables section, assignment operators are necessary to fill variables with values and make calculations and changes to them:
|
Operator |
Meaning |
Description |
|
= |
Assign |
Assigns the value on the right to the left one. |
|
+= |
Add and assign |
Adds the right value to the left one and assigns it. |
|
-= |
Subtract and assign |
Subtracts the right value from the left one and assigns it. |
|
*= |
Multiply and assign |
Multiplies the right value by the left one and assigns it. |
|
/= |
Divide and assign |
Divides the right value by the left one and assigns it. |
|
%= |
Modulo and assign |
Invokes a modulo between the right value and the left one and assigns it. |
Some examples are ...
Read now
Unlock full access