Home >>JavaScript Math Reference >JavaScript pow() Method

JavaScript pow() Method

JavaScript pow() Method

The Math pow()  Method in JavaScript is used to returns the base to the exponent power means power of a number. In other words, the base value m raised to the nth power. Generally, it is always used as Math.pow() because the pow() method in Math object is static function.

Syntax:
Math.pow (base, exponent)

Parameter Values

Parameter Description
x It Required the base
y It Required the exponent

Browser Support

Method Chrome Edge Firefox Safari Opera
pow() Yes Yes Yes Yes Yes
Here is an example of JavaScript pow() Method
<html>
<body>
<p>It multiplies the number five times like 6*6*6*6*6</p>
<button onclick="myPow()">click me</button>
<p id="pow"></p>
<script>
function myPow() {
  document.getElementById("pow").innerHTML = Math.pow(6, 5);
}
</script>
</body>
</html>
Output:

It multiplies the number five times like 6*6*6*6*6

Example 2:
<html>
<body>
<script> 
	document.write(Math.pow(-5, 0.3)); 
</script> 
</body>
</html>
Output:

No Sidebar ads