ê³±í기 (*)
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ì.
ê³±í기 ì°ì°ì(*)ë ë í¼ì°ì°ìì ê³±ì 구í©ëë¤.
ìëí´ ë³´ê¸°
console.log(3 * 4);
// Expected output: 12
console.log(-3 * 4);
// Expected output: -12
console.log("3" * 2);
// Expected output: 6
console.log("foo" * 2);
// Expected output: NaN
구문
js
x * y;
ìì
>ê³±ì
js
2 * 2; // 4
-2 * 2; // -4
Infinity ê³±í기
js
Infinity * 0; // NaN
Infinity * Infinity; // Infinity
ì«ìê° ìë ê²½ì°
js
"foo" * 2; // NaN
ëª ì¸
| Specification |
|---|
| ECMAScript® 2027 Language Specification > # sec-multiplicative-operators > |