// Math.pow(2,3)//得到2的3次方 2*2*2
Math.pow(n,m) n的m次方
Math.floor(3.14)//向下取整
console.log(Math.floor(3.14));//3
Math.ceil(3.14)//向上取整
console.log(Math.ceil(3.14));//4
// Math.round(3.14)//四舍五入
// Math.abs(-1)//取绝对值
// Math.max(10,2,3,5,9)//取最大值 10
// Math.min(10,2,3,5,9)//取最小值 2
//随机数 0-100的随机数
console.log(Math.round(Math.random()*100));
* Math.random()//0-1之间的小数 0<=n<1
//求30-50的随机数 //公式 Math.round(Math.random()*(max-min))+min console.log(Math.round(Math.random()*20)+30);