JavaScript Kit > JavaScript Reference > JavaScript Operators: Assignment Operators

Assignment Operators

Last updated: March 23rd, 2008

Also See: Assignment Operators precedence and associativity.

Operator Example Equivalent to:
= y=x+3 n/a
+= x+=3 x=x+3
-= x-=y x=x-y
*= x*=y x=x*y
/= x/=y x=x/y
%= x%=y x=x%y (modulo)
<<= x<<=y x=x<<y (Left shift)
>>= x>>=y x=x>>y (Right shift sign extension)
>>>= x>>>=y x=x>>>y (Right shift 0 extension)
&= x&=y x=x&y (bitwise AND)
|= x|=y x=x|y (bitwise OR)
^= x^=y x=x^y (bitwise XOR)

Reference List

Right column

CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info