| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Operators/Operator_precedence | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
. .
console.log(3 + 4 * 5); // 3 + 20
// Expected output: 23
console.log(4 * 3 ** 2); // 4 * 9
// Expected output: 36
let a;
let b;
console.log((a = b = 5));
// Expected output: 5
. 1 2 .
a 1 b 2 c
( ) , . .
console.log(3 + 10 * 2); // 23
console.log(3 + 10 * 2); // 23 ,
console.log((3 + 10) * 2); // 26 ,
( ) (a 1 b) 2 c , ( ) a 1 (b 2 c) . .
a = b = 5; // a = (b = 5);
a b 5 . b 5 , a b = 5 5 .
, (**) . .
|
js |
3 |
|
js |
8 |
. . .
|
js |
1 |
|
js |
512 |
|
js |
64 |
6 / 3 / 2 (6 / 3) / 2 . 2 ** 3 ** 2 2 ** (3 ** 2) . (2 ** 3) ** 2 64 .
, . 2 ** 3 / 3 ** 2 (2 ** 3) / (3 ** 2) 0.8888888888888888 .
3 > 2 && 2 > 1;
// true
3 > 2 > 1;
// 3 > 2 true, true 1
// true > 1 1 > 1 , .
// (3 > 2) > 1 .
. ( ) , .
. a &&(b + c) a falsy (b + c) . ("OR") "" . ("AND"), nullish-coalescing, . .
a || b * c; // `a` , `a` "truthy" `a` .
a && b < c; // `a` , `a` "falsy" `a` .
a ?? (b || c); // `a` , `a` `null` `undefined` `a` .
a?.b.c; // `a` , `a` `null` `undefined` `undefined` .
(19 1) .
| 19 | ( ) |
||
| 18 | . |
||
[ ] |
|||
new ( )
|
new ( ) |
||
( )
|
|||
?. |
|||
| 17 |
new ( )
|
new |
|
| 16 | ++ |
||
-- |
|||
| 15 | NOT | ! |
|
| NOT | ~ |
||
+ |
|||
- |
|||
++ |
|||
-- |
|||
typeof |
typeof |
||
void |
void |
||
delete |
delete |
||
await |
await |
||
| 14 | ** |
||
| 13 | * |
||
/ |
|||
% |
|||
| 12 | + |
||
- |
|||
| 11 | << |
||
>> |
|||
>>> |
|||
| 10 | < |
||
<= |
|||
> |
|||
>= |
|||
in |
in |
||
instanceof |
instanceof |
||
| 9 | == |
||
!= |
|||
=== |
|||
!== |
|||
| 7 | AND | & |
|
| 7 | XOR | ^ |
|
| 6 | OR | | |
|
| 5 | AND | && |
|
| 4 | OR | || |
|
?? |
|||
| 3 | () | ? : |
|
| 2 | = |
||
+= |
|||
-= |
|||
**= |
|||
*= |
|||
/= |
|||
%= |
|||
<<= |
|||
>>= |
|||
>>>= |
|||
&= |
|||
^= |
|||
|= |
|||
&&= |
|||
||= |
|||
??= |
|||
yield |
yield |
||
yield* |
yield* |
||
| 1 | / | , |
This page was last modified on 2026 7 15 by MDN contributors.
Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |