Exponentiation in JavaScript

There is also a special operator for raising a number to a power **. Let's use it to raise the number 10 to the third power:

alert(10 ** 3); // shows 1000

Let's raise the value of the variable to a power:

let a = 10; alert(a ** 3); // shows 1000

It can occur that both the number and degree will be contained in variables:

let a = 10; let b = 3; alert(a ** b); // shows 1000

Raise the number 2 to the 10th power. Display the result on the screen.

enru