当前位置:网站首页>Priority of JS operator
Priority of JS operator
2022-06-28 08:13:00 【Mediocrity and laziness】
js Operator precedence
Because recently js One of the typeof My scalp is numb because of my priority , So make a complete record js Operator priority
| priority | Arithmetic type | Relevance | Operator |
|---|---|---|---|
| 21 | parentheses | n/a( Unrelated ) | () |
| 20 | Member visit | From left to right ) | . |
| 20 | Member access to be calculated | From left to right ) | [] |
| 20 | new ( With parameter list ) | n/a | new … ( … ) |
| 20 | Function call | From left to right ) | … ( … ) |
| 20 | Optional chain (Optional chaining) | From left to right ) | ?. |
| 19 | new ( No parameter list ) | From right to left | new … |
| 18 | Post increment ( Operator after ) | n/a | … ++ |
| 18 | Post decrement ( Operator after ) | n/a | … – |
| 17 | Logic is not | From right to left | ! … |
| 17 | Bitwise non | From right to left | ~ … |
| 17 | Unary addition | From right to left | + … |
| 17 | One dollar subtraction | From right to left | - … |
| 17 | Pre increment | From right to left | ++ … |
| 17 | Pre decrement | From right to left | –… |
| 17 | typeof | From right to left | typeof |
| 17 | void | From right to left | void |
| 17 | delete | From right to left | delete |
| 17 | await | From right to left | await |
| 16 | power | From right to left | … ** … |
| 15 | Multiplication | From left to right | … *… |
| 15 | division | From left to right | … /… |
| 15 | modulus | From left to right | … %… |
| 14 | Add | From left to right | … +… |
| 14 | Subtraction | From left to right | … -… |
| 13 | Move left according to position | From left to right | … << … |
| 13 | Right shift to position | From left to right | … >>… |
| 13 | unsigned right shift | From left to right | … >>> … |
| 12 | Less than | From left to right | … < … |
| 12 | Less than or equal to | From left to right | … <= … |
| 12 | Greater than | From left to right | … <>… |
| 12 | Greater than or equal to | From left to right | … >= … |
| 12 | in | From left to right | … in … |
| 12 | instanceof | From left to right | … instanceof … |
| 11 | Equal sign | From left to right | … ==… |
| 11 | Unequal sign | From left to right | … !=… |
| 11 | All in one | From left to right | … ===… |
| 11 | Not all equals | From left to right | … !==… |
| 10 | Bitwise AND | From left to right | … &… |
| 9 | Bitwise XOR | From left to right | … ^… |
| 8 | Press bit or | From left to right | … 1… |
| 7 | Logic and | From left to right | … &&… |
| 6 | Logic or | From left to right | 11 |
| 5 | Null merge | From left to right | … ?? … |
| 4 | Conditional operator | From right to left | … ? … : |
| 3 | assignment | From right to left | … =、+= Equisign … |
| 2 | yield | From right to left | yield … |
| 2 | yield* | From right to left | yield* … |
| 1 | Expand operator | n/a | … |
| 0 | comma | From right to left | , |
Unable to type in the table because of the editor
|Symbol , So here we use 1 Instead of , Please pay attention to the difference .
边栏推荐
猜你喜欢

Airflow2.x distributed deployment DAG execution failure log cannot be obtained normally

B_ QuRT_ User_ Guide(26)

Devops Basics: Jenkins deployment and use (I)

GPIO configuration of SOC

设置网页的标题部分的图标

The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition

Airflow2.1.1 summary of the pits stepped on in actual combat!!

设置cmd的编码为utf-8

B_ QuRT_ User_ Guide(28)

2022巴黎时装周儿童单元6.19武汉站圆满落幕
随机推荐
块级元素上下左右居中的两个小技巧
SQL analysis (query interception analysis for SQL optimization)
The solution of "user account control to continue, please enter administrator user name and password" appears in win10 Professional Edition
Configuring multiple instances of MySQL under Linux
2022第六季完美童模 佛山赛区 初赛圆满落幕
Redis uses sentinel master-slave switching. What should the program do?
Trigonometric transformation formula
How to insert a single quotation mark into a table as a data type in Oracle pl/sql
Image translation /transformer:ittr: unpaired image to image translation with transformers
MySQL two table connection principle (understand join buf)
sql主從複制搭建
Redis master-slave structure and application scenarios
Configuring MySQL multi instance master-slave synchronization for Linux
Is it reliable to open an account by digging money? Is it safe?
【学习笔记】拟阵
About ASM disk space full, clean up ASM disk
挖财注册开户靠谱吗?安全吗?
Leetcode摆动序列系列
Installing mysql5.7 under Windows
【学习笔记】搜索