Assignment Expression
Assignment expressions are used to assign a value to a variable. They may also be chained based on their order of precedence, where each item is one by one evaluated.
Syntax
Simple Assignment
Operator Modified Assignment
Besides the regular assignment, there are also operators that modify the value of the variable by
the value of the expression. These operators are +=
, -=
, *=
,
/=
, **=
and %=
. These acts like arithmetic expressions and
assignments combined.