ê±°ëì ê³± í ë¹ (**=)
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2017ë 3ìâ©.
ê±°ëì ê³± í ë¹ ì°ì°ì(**=)ë ì¤ë¥¸ìª½ í¼ì°ì°ìì ê°ì¼ë¡ ë³ì를 ê±°ëì ê³±í 결과를 ë¤ì ë³ìì í ë¹í©ëë¤.
ìëí´ ë³´ê¸°
let a = 3;
console.log((a **= 2));
// Expected output: 9
console.log((a **= 0));
// Expected output: 1
console.log((a **= "hello"));
// Expected output: NaN
구문
js
x **= y; // x = x ** y
ìì
>ê±°ëì ê³± í ë¹ ì¬ì©í기
js
// bar = 5
// ìì ê°ì ë³ì를 ê°ì í ë
bar **= 2; // 25
bar **= "foo"; // NaN
ëª ì¸
| Specification |
|---|
| ECMAScript® 2026 Language Specification > # sec-assignment-operators > |