--- title: べき乗代入 (**=) slug: Web/JavaScript/Reference/Operators/Exponentiation_assignment tags: - Assignment operator - JavaScript - Language feature - Operator - Reference translation_of: Web/JavaScript/Reference/Operators/Exponentiation_assignment ---
べき乗代入演算子 (**=
) は、変数の値を右辺のオペランドでべき乗します。
Operator: x **= y Meaning: x = x ** y
// 次の変数を想定 // bar = 5 bar **= 2 // 25 bar **= 'foo' // NaN
仕様 |
---|
{{SpecName('ESDraft', '#sec-assignment-operators', 'Assignment operators')}} |
{{Compat("javascript.operators.exponentiation_assignment")}}