📜  javascript代码示例中的指数

📅  最后修改于: 2022-03-11 15:03:23.128000             🧑  作者: Mango

代码示例2
let number = 2;
let exponent = 3;

//using the exponent operator
console.log( number ** exponent);
// using the Math library 
console.log( Math.pow(number, exponent);
// these will both output 8