Use ** for exponents:
console.log(2 ** 3) // 8 (2 × 2 × 2)
console.log(5 ** 2) // 25 (5 × 5)
console.log(10 ** 0) // 1 (any number to power 0)
This is cleaner than the older Math.pow() function:
// Both do the same thing
console.log(2 ** 10) // 1024
console.log(Math.pow(2, 10)) // 1024
You can also use fractional exponents for roots: 8 ** (1/3) gives (cube root of ).