We're looking for a user researcher to understand the needs of developers and designers. Is this you or someone you know? Check out the post: https://mzl.la/2IGzdXS

Math.pow Redirect 1


The Math.pow() function returns the base to the exponent Power,  that is, baseexponent.


Math.pow(base, exponent) 


The base number.
The exponent used to raise the base.


Because pow is a static method of Math, you always use it as Math.pow(), instead as a method of a Math Object you created.


Example: Using Math.pow

function raisePower(x,y) {
   return Math.pow(x,y)

If x is 7 and y is 2, raisePower returns 49 (7 to the power of 2).


Specification Status Comment
ECMAScript 1st Edition. Implemented in JavaScript 1.0 Standard Initial definition.
ECMAScript Language Specification 5.1th Edition (ECMA-262) Standard  
ECMAScript Language Specification 6th Edition (ECMA-262) Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

See also

Document Tags and Contributors

Contributors to this page: Sheppy
Last updated by: Sheppy,