Operator | Data Type | Description |
---|---|---|
== | any | Tests for equality (performs implicit data type conversion) |
!= | any | Tests for inequality (performs implicit data type conversion) |
=== | any | Tests for equality and same data type |
!== | any | Tests for equality and same data type |
> | numbers, strings | Greater Than |
>= | numbers, strings | Greater Than or Equal |
< | numbers, strings | Less Than |
<= | numbers, strings | Less Than or Equal |
Operator | Data Type | Description |
---|---|---|
+ | numbers | Addition |
- | numbers | Subtraction |
* | numbers | Multiplication |
/ | numbers | Division |
% | numbers | Remainder after division is performed |
++ | numbers | Increment (pre-increment or post-increment) |
-- | numbers | Decrement (pre-decrement or post-decrement) |
Operator | Data Type | Description |
---|---|---|
= | any variable | Assign value |
+= | any variable | Add and assign value (same as h = h + 3) |
-= | any variable | Subtract and assign value (same as h = h - 12) |
*= | any variable | Multiply and assign value (same as h = h * 7) |
/= | any variable | Divide and assign value (same as h = h / 5) |
%= | any variable | Divide and assign remainder value (same as h = h % 10) |
<<= | any variable | Left shift and assign value (same as h = h << 3) |
>>= | any variable | Right shift with sign extension and assign value (same as h = h >> 9) |
>>>== | any variable | Right shift with zero extension and assign value (same as h = h >>> 17) |
&= | any variable | Bitwise AND and assign value (same as h = h & 6) |
^= | any variable | Bitwise XOR and assign value (same as h = h ^ 4) |
|= | any variable | Bitwise OR and assign value (same as h = h | 50) |
Operator | Data Type | Description |
---|---|---|
&& | boolean | Logical AND |
|| | boolean | Logical OR |
! | boolean | Logical NOT (inverts the boolean value) |
Operator | Data Type | Description |
---|---|---|
+ | string | Concatenate |
+= | string | Concatenate by appending to the end of the string |
Operator | Data Type | Description |
---|---|---|
& | integer (32 bit number) | Bitwise AND |
^ | integer (32 bit number) | Bitwise XOR |
| | integer (32 bit number) | Bitwise OR |
<< | integer (32 bit number) | Left shift |
>> | integer (32 bit number) | Right shift with sign extension |
>>> | integer (32 bit number) | Right shift with zero extension |