JavaScript Exponentiation Operator


Arithmetic Exponentiation

** symbol is used for arithmetic exponentiation operator

arithmetic exponentiation operator takes two values/variables as operands and returns the result of the left operand raised to the power of right operand

a ** b  //a raised to the power of b
6 ** 4  //6 raised to the power of 4

Examples

1. a raised to the power of b using exponentiation operator

var a = 5;
var b = 4;

var result = a ** b;

console.log(result);