目录

Math.pow(x, y)

此方法将基数返回到指数幂,即基于幂指数。

语法 (Syntax)

Math.pow(x, y) 

参数 (Parameter)

  • x - 代表基数
  • y - 代表指数

返回值 (Return Value)

返回指数幂的基数。

例子 (Example)

console.log("---Math.pow()---") 
console.log("math.pow(2,3) : "+Math.pow(2, 3)) 
console.log("Math.pow(1.7, 2.3) : "+Math.pow(1.7, 2.3))            

输出 (Output)

---Math.pow()--- 
math.pow(2,3) : 8 
Math.pow(1.7, 2.3) : 3.388695291147646             
↑回到顶部↑
WIKI教程 @2018