pow

math

Raises a number to a power

Syntax

pow(base, exponent)

Parameters

base (number)

The base number

exponent (number)

The exponent to raise the base to

Returns

number

The result of base raised to the exponent power

Examples

Input:
pow(2, 3)
Output:
8
Input:
pow(10, 2)
Output:
100
Input:
pow(5, 0)
Output:
1

The pow() function raises a number to a power, calculating base^exponent.

Usage

Use pow() for exponential calculations, compound interest, or any mathematical operation involving powers.

Related Functions