็ธไน้็ฎๅญ๏ผ*๏ผ
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ยฎ 2026 Language Specification # sec-multiplicative-operators |
็่ฆฝๅจ็ธๅฎนๆง
Loadingโฆ