|
|
Custom operators are sweet.
|
|
|
|
|
|
Unary Operators:
|
|
|
|
|
|
| Operator | Precedence |
|
|
|
| ---------- | ---------- |
|
|
|
|`new` | 16
|
|
|
|`++` | 15
|
|
|
|`--` | 15
|
|
|
|`!` | 14
|
|
|
|`~` | 14
|
|
|
|`+` | 14
|
|
|
|`-` | 14
|
|
|
|`typeof` | 14
|
|
|
|`void` | 14
|
|
|
|`delete` | 14
|
|
|
|`yield` | 2
|
|
|
|
|
|
Binary Operators:
|
|
|
|
|
|
| Operator | Precedence | Associativity |
|
|
|
| ---------- | ---------- | ------------- |
|
|
|
|`new` | 16 | na
|
|
|
|`++` | 15 | na
|
|
|
|`--` | 15 | na
|
|
|
|`!` | 14 | na
|
|
|
|`~` | 14 | na
|
|
|
|`+` | 14 | na
|
|
|
|`-` | 14 | na
|
|
|
|`typeof` | 14 | na
|
|
|
|`void` | 14 | na
|
|
|
|`delete` | 14 | na
|
|
|
|`yield` | 2 | na
|
|
|
| `*`| 13| left
|
|
|
| `/`| 13| left
|
|
|
| `%`| 13| left
|
... | ... | |