Returns base to the exponent power, that is, base^exponent^.
Method of Math
Static
Syntax
pow( x, y )
Parameters
Parameter | Description |
---|---|
base | The base number |
exponent | The exponent to which to raise base |
Description
Because pow is a static method of Math, you always use it as Math.pow(), rather than as a method of a Math object you created.
Examples
If x is 7 and y is 2, raisePower returns 49 (7 to the power of 2).