JS ⟩ operator ⟩ assignment
an operator for arithmetic/bitwise/logical assignment.
const can't be changed through reassignment (by using the assignment operators)
types of assignment operators
assignment (=) operator
assignment with operation
*= multiplication assignment.
*=
**= exponentiation assignment.
**=
/= division assignment.
/=
%= remainder assignment.
%=
+= addition assignment.
+=
-= subtraction assignment
-=
<<= left shift assignment.
<<=
>>= right shift assignment.
>>=
>>>= unsigned right shift assignment.
>>>=
&= bitwise AND assignment.
&=
^= bitwise XOR assignment.
^=
|= bitwise OR assignment.
|=
&&= logical AND assignment.
&&=
||= logical OR assignment.
||=
??= logical nullish assignment.
??=
destructuring assignment - [a, b] = arr, { a, b } = obj
[a, b] = arr
{ a, b } = obj
JavaScript: The Definitive Guide ⟩ 4.11 Assignment Expressions
Expressions and operators ⟩ assignment operators
Last updated 2 years ago
Was this helpful?