pow Function

Top  Previous  Next

Returns the value of a number to the power of a number.

Syntax

Math.pow(number1, number2)

Arguments

number1A number representing the base.
number2A number representing the exponent

Return Value

Returns the value of the base to the power of the exponent.

Example

Math.pow(2,0);       // Returns 1

Math.pow(2,2);       // Returns 4