Operator precedence
Operator precedence determines the order in which operators are evaluated. Operators with higher precedence are evaluated first. A common example: 3 + 4 * 5 // returns 23 The multiplication operator (" * ") has higher precedence than the addition operator (" + ") and thus will be evaluated first. Associativity Edit Associativity determines the order in which operators of the same precedence are processed. For example, consider an expression: a OP b OP c Left-associativity (left-to-right) means that it is processed as (a OP b) OP c , while right-associativity (right-to-left) means it is interpreted as a OP (b OP c) . Assignment operators are right-associative, so you can write: a = b = 5 ; with the expected result that a and b get the value 5. This is because the assignment operator returns the value that it assigned. First, b is set to 5. Then the a is also set to 5, the return value of b = 5 , aka...