JavaScript Wiki

Each entry except the first (and second) is derived as an arithmetic operator combined with the "equals" sign. All assignment operators evaluate to the assigned value.

=[]

The primary assignment operator, and by far the most important among all the operators, is the lone "equals" sign (=). Syntactically, the "variable" is to the left of the = and the "value" is to the right. Whatever a variable holds before assignment, it is replaced by the value.

variable = value;

+=[]

"Plus-equals" adds or concatenates the right value to the left variable's value and assigns the result to the left variable.

-=[]

"Minus-equals" subtracts the right value from the value of the left variable and assigns the result to the left variable.

*=[]

"Times-equals" multiplies the value of the left variable to the right value and assigns the result to the left variable.

/=[]

"Over-equals" divides the value of the left variable by the right value and assigns the result to the left variable.

%=[]

"Percent-equals" finds the remainder of the corresponding division and assigns the result to the left variable.