Understanding the ActionScript Language > Using operators to manipulate values in expressions > Operator associativity

 

Operator associativity

When two or more operators share the same precedence, their associativity determines the order in which they are performed. Associativity can be either left-to-right or right-to-left. For example, the multiplication operator has an associativity of left-to-right; therefore, the following two statements are equivalent:

total = 2 * 3 * 4;
total = (2 * 3) * 4;

For a table of all operators and their associativity, see Operator Precedence and Associativity.