1Math.pow(base, exponent);
2
3Math.pow(2, 4);
4// Outputs 16
5// The same as going 2^4, 2 to the power of 4
1let number = 2;
2let exponent = 3;
3
4//using the exponent operator
5console.log( number ** exponent);
6// using the Math library
7console.log( Math.pow(number, exponent);
8// these will both output 8