--- title: 乘法 (*) slug: Web/JavaScript/Reference/Operators/Multiplication translation_of: Web/JavaScript/Reference/Operators/Multiplication ---
乘法运算符 (*
) 计算操作数的乘积。
Operator: x * y
2 * 2 // 4 -2 * 2 // -4
Infinity * 0 // NaN Infinity * Infinity // Infinity
'foo' * 2 // NaN
Specification |
---|
{{SpecName('ESDraft', '#sec-multiplicative-operators', 'Multiplication operator')}} |
{{Compat("javascript.operators.multiplication")}}