| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Operators/Multiplication | [Back] [Original] |
Get to know MDN better
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
x * y
2 * 2; // 4
-2 * 2; // -4
Infinity * 0; // NaN
Infinity * Infinity; // Infinity
"foo" * 2; // NaN
| ECMAScript 2027 LanguageSpecification # sec-multiplicative-operators |
| Web Proxy Viewer | New URL | Original Page |