English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
'sMath.pow()The method returns the base raised to the power of the exponent, that is, the baseExponent.
Since pow() is a static method of Math, you should always use it asMath.pow(), rather than as a method of the created Math object.
Math.pow(x, y)
Math.pow(5, 3);// 125Test and See‹/›
All browsers fully support the Math.pow() method:
Method | |||||
Math.pow() | Is | Is | Is | Is | Is |
Parameter | Description |
---|---|
x | Base |
y | Used to raise the base to the power of the exponent |
Return Value: | Represents a number that is the product of a given base raised to the power of a given exponent |
---|---|
JavaScript Version: | ECMAScript 1 |