| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Math/pow | [Back] [Original] |
Get to know MDN better
Math.pow() baseexponent base^exponent
console.log(Math.pow(7, 3));
// Expected output: 343
console.log(Math.pow(4, 0.5));
// Expected output: 2
console.log(Math.pow(7, -2));
// Expected output: 0.02040816326530612
// (1/49)
console.log(Math.pow(-7, 0.5));
// Expected output: NaN
Math.pow(base, exponent)
pow Math Math.pow() Math
Math.powfunction raisePower(x, y) {
return Math.pow(x, y);
}
x 2 y 7 raisePower 1282 7
| ECMAScript 2027 LanguageSpecification # sec-math.pow |
MathMath.abs()Math.acos()Math.acosh()Math.asin()Math.asinh()Math.atan()Math.atan2()Math.atanh()Math.cbrt()Math.ceil()Math.clz32()Math.cos()Math.cosh()Math.exp()Math.expm1()f16round()Math.floor()Math.fround()Math.hypot()Math.imul()Math.log()Math.log1p()Math.log2()Math.log10()Math.max()Math.min()Math.pow()Math.random()Math.round()Math.sign()Math.sin()Math.sinh()Math.sqrt()sumPrecise()Math.tan()Math.tanh()Math.trunc()| Web Proxy Viewer | New URL | Original Page |