[JavaScript] 기본연산자 ( +, -, *, /, **, % )와 연산자 우선순위
JavaScript 연산자
+
-, *, /, **, %
Precedence | Operator type | Associativity | Individual operators |
21 | n/a | ( … ) | |
20 | left-to-right | … . … | |
left-to-right | … [ … ] | ||
new (with argument list) | n/a | new … ( … ) | |
left-to-right | … ( … ) | ||
left-to-right | ?. | ||
19 | new (without argument list) | right-to-left | new … |
18 | n/a | … ++ | |
… -- | |||
17 | right-to-left | ! … | |
~ … | |||
+ … | |||
- … | |||
++ … | |||
-- … | |||
typeof … | |||
void … | |||
delete … | |||
await … | |||
16 | right-to-left | … ** … | |
15 | left-to-right | … * … | |
… / … | |||
… % … | |||
14 | left-to-right | … + … | |
… - … | |||
13 | left-to-right | … << … | |
… >> … | |||
… >>> … | |||
12 | left-to-right | … < … | |
… <= … | |||
… > … | |||
… >= … | |||
… in … | |||
… instanceof … | |||
11 | left-to-right | … == … | |
… != … | |||
… === … | |||
… !== … | |||
10 | left-to-right | … & … | |
9 | left-to-right | … ^ … | |
8 | left-to-right | … | … | |
7 | left-to-right | … && … | |
6 | left-to-right | … || … | |
5 | left-to-right | … ?? … | |
4 | right-to-left | … ? … : … | |
3 | right-to-left | … = … | |
… += … | |||
… -= … | |||
… **= … | |||
… *= … | |||
… /= … | |||
… %= … | |||
… <<= … | |||
… >>= … | |||
… >>>= … | |||
… &= … | |||
… ^= … | |||
… |= … | |||
… &&= … | |||
… ||= … | |||
… ??= … | |||
2 | right-to-left | yield … | |
yield* … | |||
1 | left-to-right | … , … |
댓글
댓글 쓰기