Previous Topic: Array and Object Access OperatorsNext Topic: Arithmetic Operators


Assignment Operators

JavaScript provides the normal assignment operator and arithmetic assignment operators that provide shortcuts for common arithmetic operators.

Operator

Example

Equivalent

=

a = b

 

+=

a += b

a = a + b

-=

a -= b

a = a - b

*=

a *= b

a = a * b

/=

a /= b

a = a / b

%=

a %= b

a = a % b