ä¹ç® (*)
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
ç¡é大ã¨ã®ä¹ç®
js
Infinity * 0; // NaN
Infinity * Infinity; // Infinity
éæ°ã¨ã®ä¹ç®
js
"foo" * 2; // NaN
仿§æ¸
| Specification |
|---|
| ECMAScript® 2027 Language Specification> # sec-multiplicative-operators> |