Return the value of the number 4 to be the power of 3 (4*4*4):
The result will be:
More "Try it Yourself" examples below.
The pow() method returns the value of x to the power of y (xy).
Method | |||||
---|---|---|---|---|---|
pow() | Yes | Yes | Yes | Yes | Yes |
Parameter | Description |
---|---|
x | Required. The base |
y | Required. The exponent |
Return Value: | A Number, representing the value of x to the power of y (xy) |
---|---|
JavaScript Version: | 1.0 |
Use the pow() method on different numbers:
The result of a,b,c,d,e, and f will be: