mozilla
Your Search Results

    Math.pow()

    Summary

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

    Syntax

    Math.pow(base, exponent)

    Parameters

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

    Description

    Because pow() is a static method of Math, you always use it as Math.pow(), rather than as a method of a Math object you created (Math is no constructor).

    Examples

    Example: Using Math.pow()

    Math.pow(7, 2); // 49

    Specifications

    Specification Status Comment
    ECMAScript 1st Edition. Standard Initial definition. Implemented in JavaScript 1.0.
    ECMAScript 5.1 (ECMA-262)
    The definition of 'Math.pow' in that specification.
    Standard  
    ECMAScript 6 (ECMA-262)
    The definition of 'Math.pow' in that specification.
    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: evilpie, Sheppy, Marcoos, fscholz, Mingun, ethertank, egiw, Mgjbot, Maian, Dria, Kyodev
    Last updated by: fscholz,