![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
This table lists all of the ActionScript operators and their associativity, from highest to lowest precedence.
Operator |
Description |
Associativity |
---|---|---|
Highest precedence |
||
+ |
Unary plus |
Right to left |
- |
Unary minus |
Right to left |
~ |
Bitwise NOT |
Right to left |
! |
Logical NOT |
Right to left |
not |
Logical NOT (Flash 4 style) |
Right to left |
++ |
Post-increment |
Left to right |
-- |
Post-decrement |
Left to right |
( ) |
Function call |
Left to right |
[ ] |
Array element |
Left to right |
. |
Structure member |
Left to right |
++ |
Pre-increment |
Right to left |
-- |
Pre-decrement |
Right to left |
new |
Allocate object |
Right to left |
delete |
Deallocate object |
Right to left |
typeof |
Type of object |
Right to left |
void |
Returns undefined value |
Right to left |
* |
Multiply |
Left to right |
/ |
Divide |
Left to right |
% |
Modulo |
Left to right |
+ |
Add |
Left to right |
add |
String concatenation (formerly &) |
Left to right |
- |
Subtract |
Left to right |
<< |
Bitwise left shift |
Left to right |
>> |
Bitwise right shift |
Left to right |
>>> |
Bitwise right shift (unsigned) |
Left to right |
< |
Less than |
Left to right |
<= |
Less than or equal to |
Left to right |
> |
Greater than |
Left to right |
>= |
Greater than or equal to |
Left to right |
instanceof |
Instance of |
Left to right |
lt |
Less than (string version) |
Left to right |
le |
Less than or equal to (string version) |
Left to right |
gt |
Greater than (string version) |
Left to right |
ge |
Greater than or equal to (string version) |
Left to right |
== |
Equal |
Left to right |
!= |
Not equal |
Left to right |
eq |
Equal (string version) |
Left to right |
ne |
Not equal (string version) |
Left to right |
& |
Bitwise AND |
Left to right |
^ |
Bitwise XOR |
Left to right |
| |
Bitwise OR |
Left to right |
&& |
Logical AND |
Left to right |
and |
Logical AND (Flash 4) |
Left to right |
|| |
Logical OR |
Left to right |
or |
Logical OR (Flash 4) |
Left to right |
?: |
Conditional |
Right to left |
= |
Assignment |
Right to left |
*=, /=, %=, +=, -=, &=, |=, ^=, <<=, >>=, >>>= |
Compound assignment |
Right to left |
, |
Comma |
Left to right |
Lowest precedence |
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |