JavaScript Math pow()

The JavaScript math pow() method is used to get the value of base to the power of an exponent.
Syntax:

Math.pow(base,exponent)

Parameters
base: It represents the base number.
exponent: It represents the exponent to which the base has to raise.

Returns
Base value to the power of exponent.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.pow(2,4));
</script>
</body>
</html>