--- title: Multiplication assignment (*=) slug: Web/JavaScript/Reference/Operators/Multiplication_assignment translation_of: Web/JavaScript/Reference/Operators/Multiplication_assignment ---
The multiplication assignment operator (*=
) multiplies a variable by the value of the right operand and assigns the result to the variable.
Operator: x *= y Meaning: x = x * y
// Assuming the following variable // bar = 5 bar *= 2 // 10 bar *= 'foo' // NaN
Specification |
---|
{{SpecName('ESDraft', '#sec-assignment-operators', 'Assignment operators')}} |
{{Compat("javascript.operators.multiplication_assignment")}}