Operators |
Previous Top Next |
Operators in Javascript
Arithmetic
+ |
addition |
- |
subtraction |
++ |
increment |
-- |
decrement |
* |
multiply |
/ |
divide |
% |
modulus |
String
+ |
concatenate |
+= |
append |
Logical
&& |
AND |
|| |
OR |
! |
NOT |
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 |