Appendix C. JavaScript Operator Precedence Chart
This appendix contains the operator precedence chart for JavaScript/ECMAScript (Fig. C.1). The operators are shown in decreasing order of precedence from top to bottom.
Table C.1. JavaScript/ECMAScript operator precedence and associativity.
Operator | Type | Associativity |
---|---|---|
| member access | left to right |
| array indexing | |
| function calls | |
| increment | right to left |
| decrement | |
| unary minus | |
| bitwise complement | |
| logical NOT | |
| deletes an array element or object property | |
| creates a new object | |
| returns the data type of its argument | |
| prevents an expression from returning a value | |
| multiplication | left to right |
| division | |
| modulus | |
| addition | left to right |
| subtraction | |
| string concatenation | |
| left shift | left to right ... |
Get Internet & World Wide Web: How to Program, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.