ê³±í기 í ë¹ (*=)
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 = 2;
console.log((a *= 3));
// Expected output: 6
console.log((a *= "hello"));
// Expected output: NaN
구문
js
x *= y; // x = x * y
ìì
>ê³±í기 í ë¹ ì¬ì©í기
js
// bar = 5
// ìì ê°ì ë³ì를 ê°ì í ë
bar *= 2; // 10
bar *= "foo"; // NaN
ëª ì¸
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-assignment-operators> |