Unsigned ì¤ë¥¸ìª½ ìíí¸ í ë¹ ì°ì°ì (>>>=)
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since 2015ë 7ì.
unsigned ì¤ë¥¸ìª½ ìíí¸ í ë¹(>>>=) ì°ì°ìë ì§ì ë ì ë§í¼ unsigned ì¤ë¥¸ìª½ ìíí¸ ì°ì°ì ìííê³ ê·¸ 결과를 ì¼ìª½ í¼ì°ì°ìì í ë¹í©ëë¤.
ìëí´ ë³´ê¸°
let a = 5; // 00000000000000000000000000000101
a >>>= 2; // 00000000000000000000000000000001
console.log(a);
// Expected output: 1
let b = -5; // -00000000000000000000000000000101
b >>>= 2; // 00111111111111111111111111111110
console.log(b);
// Expected output: 1073741822
구문
js
x >>>= y
ì¤ëª
x >>>= y ë x = x >>> yì ê°ì ì미를 ê°ì§ëë¤.
ìì
>unsigned ì¤ë¥¸ìª½ ìíí¸ í ë¹ ì°ì°ì ì¬ì©
js
let a = 5; // (00000000000000000000000000000101)
a >>>= 2; // 1 (00000000000000000000000000000001)
let b = -5; // (-00000000000000000000000000000101)
b >>>= 2; // 1073741822 (00111111111111111111111111111110)
let c = 5n;
c >>>= 2n; // 1n
ëª ì¸
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-assignment-operators> |