|
Operators in Javascript
Arithmetic
+
|
addition
|
-
|
subtraction
|
++
|
increment
|
--
|
decrement
|
*
|
multiply
|
/
|
divide
|
%
|
modulus
|
String
Logical
Bitwise
&
|
bitwise AND
|
^
|
bitwise XOR
|
|
|
bitwise OR
|
~
|
bitwise NOT
|
<<
|
bitwise LEFT SHIFT
|
>>
|
bitwise RIGHT SHIFT
|
Assignment
=
|
n = 2
|
+=
|
n = n+x
|
-=
|
n = n-x
|
*=
|
n = n*x
|
/=
|
n = n/x
|
%-
|
n = n%x
|
&=
|
n = n&x
|
^=
|
n = n^x
|
|=
|
n = n|x
|
<<=
|
n = n<<x
|
>>=
|
n = n>>x
|
Comparison
==
|
is equal to
|
!=
|
is NOT equal to
|
>
|
is greater than
|
>=
|
is greater than or equal
|
<
|
is less than
|
<=
|
is less than or equal to
|
|