5.
Which Math function in JavaScript returns the value of a base raised to the power of an exponent?
Math.abs()
Math.log()
Math.sqrt()
Math.pow()
Correct: D
The Math.pow() function returns the value of a base raised to the power of an exponent. It takes two arguments, the base and the exponent, and calculates the result.
console.log(Math.pow(2, 3)); // Output: 8