The pow() function returns the result of raising a number(base)  to a certain power(exponent), i.e., base^exponent.

Syntax: 

pow(base, exp)

The base is the numeric value that we want to raise to some power, while the exp i.e exponent, is the value that indicates to how many times the base should be multiplied by itself.

Example:

pow(2, 2)
//4
pow(25, 2)
//625
pow(10.5, 5)
//127628.15625
pow(100, 0.5)
//10.0
pow(100, -0.5)
//0.1

When both base and exponent are integers, the function accepts an optional third argument , the modulus, which is used to calculate the result of the expression in modula arithmetic. 

Syntax:

pow(base, exp, mod)

The expression gets solved as (base ^ exp % mod).

Examples;

pow(3, 2, 3)
//0
pow(5, 2, 3)
//1
pow(8, 6, 5)
//4
pow(10, 10, 15)
//10
pow(3.5, 4, 5)
//TypeError: pow() 3rd argument not allowed unless all arguments are integers