Math Pow function of Javascript calculates the value of base with exponential power. Math.pow Javascript function accepts two parameters x,y; first parameter x accepts value for base and second parameter y accepts value for power. Javascript Math.pow function evaluates the value for xy i.e. x power y or multiply base x for y times.

Syntax for Javascript Math Pow Function

Math.pow(x, y);

Math pow function in the above syntax shows that pow function accepts two parameters. First parameter works as base to the second parameter as power.

Examples of Javascript Math Pow Function

document.write(Math.pow(2, 4) + "<br />");

document.write(Math.pow(4, 2) + "<br />");

document.write(Math.pow(9, 3) + "<br />");

document.write(Math.pow(-9, 3) + "<br />");

document.write(Math.pow(-9, 2) + "<br />");

// Output:
// 16
// 16
// 729
// -729
// 81

Above example shows the use of different sets of numbers with Javascript Math.pow function and returns the product of base x for y times. 

Continue to next tutorial: Javascript Math Number Add to learn how to add the numeric value of two variables.

Recent JavaScript Tutorials

Javascript FSO ShortPath property

Javascript FileSystemObject (FSO) provides a ShortPath property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Path Property

Javascript FileSystemObject (FSO) provides the Path property that can be accessed through the file object or folder object returned by the GetFile or GelFolder method

Javascript FSO Type property

Javascript FileSystemObject (FSO) provides a Type property that can be accessed through file object or folder object returned by the GetFile or GetFolder method

Javascript FSO ShortName property

Javascript FileSystemObject (FSO) provides a ShortName property that can be accessed using the folder object or file object returned by the GetFolder or GetFile method.

Javascript FSO Name Property

Javascript FileSystemObject (FSO) provides a Name property that can be accessed using file object or folder object.