📦 Archived documentation: r1 (committed 2026-10-07) View current documentation →

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

NameTypeRequiredDefaultDescription
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