| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Multiplication_assignment | [Back] [Original] |
Get to know MDN better
let a = 2;
console.log((a *= 3));
// : 6
console.log((a *= "hello"));
// : NaN
x *= y
x *= y x = x * y x
let bar = 5;
bar *= 2; // 10
let bar = 5;
bar *= "foo"; // NaN
let foo = 3n;
foo *= 2n; // 6n
foo *= 1; // TypeError: Cannot mix BigInt and other types, use explicit conversions
| ECMAScript 2027 LanguageSpecification # sec-assignment-operators |
| Web Proxy Viewer | New URL | Original Page |