1// Use Math.pow(a,b); where a is your value and b is the exponent
2var num = Math.pow(4, 2);
3//num returns 16
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
1// Use Math.exp(a) to return the exponential of the value passed
2var num = Math.exp(1)