Exponentation
let base = 3;
let exponent = 4;
// old way Math.pow()
console.log(Math.pow(base ,exponent)) //81
// new way
console.log(base**exponent); //81
Exponentiation Assignment
The exponentiation assignment operator (**=
) raises the value of a variable to the power of the right operand.
Example
let x = 5;
x **= 2; // result 25
Backlinks