Math.pow()
Math.pow(x, y) → number
Returns base x to the exponent power y.
Returns x raised to the power y (that is, x^y).
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | optional | — | The base. |
| y | number | optional | — | The exponent. |
Returns
number
x raised to the power y.
Example
let p = Math.pow(2, 10); // 1024