Standard built-ins
Math.pow()
Raises the converted Number base to the converted Number exponent. Negative finite bases with nonintegral exponents produce NaN. BigInt inputs are not supported; use BigInt exponentiation for nonnegative integral BigInt exponents.
Formal Syntax & Structure
javascript syntaxjavascript
Math.pow(base, exponent)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| base | number | Base converted to Number. |
| exponent | number | Exponent converted to Number. |
Return Value
number
Exponentiation result.
Working Example
Example Snippetjavascript
console.log(Math.pow(2,4));