This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

์™ผ์ชฝ ์‹œํ”„ํŠธ ํ• ๋‹น ์—ฐ์‚ฐ์ž (<<=)

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

๋ธŒ๋ผ์šฐ์ € ํ˜ธํ™˜์„ฑ

๊ฐ™์ด ๋ณด๊ธฐ