Standard built-ins

Math.pow()

Try the free JavaScript compiler

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

NameTypeDescription
basenumberBase converted to Number.
exponentnumberExponent converted to Number.

Return Value

number

Exponentiation result.

Working Example

Example Snippetjavascript
console.log(Math.pow(2,4));
JavaScript Reference