์ผ์ชฝ ์ํํธ ํ ๋น ์ฐ์ฐ์ (<<=)
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์โฉ.
์ผ์ชฝ ์ํํธ ํ ๋น (<<=
) ์ฐ์ฐ์๋ ์ง์ ๋ ๋นํธ ์ ๋งํผ ์ผ์ชฝ์ผ๋ก ๋นํธ๋ฅผ ์ด๋์ํค๊ณ ๊ทธ ๊ฒฐ๊ณผ๋ฅผ ๋ณ์์ ๋ฐ์ํฉ๋๋ค.
์๋ํด ๋ณด๊ธฐ
let a = 5; // 00000000000000000000000000000101
a <<= 2; // 00000000000000000000000000010100
console.log(a);
// Expected output: 20
๊ตฌ๋ฌธ
js
x <<= y // x = x << y
์์
์ผ์ชฝ ์ํํธ ํ ๋นํ๊ธฐ
js
let a = 5;
// 00000000000000000000000000000101
a <<= 2; // 20
// 00000000000000000000000000010100
๋ช ์ธ
Specification |
---|
ECMAScriptยฎ 2026 Language Specification # sec-assignment-operators |
๋ธ๋ผ์ฐ์ ํธํ์ฑ
Loadingโฆ