Math对象
Math.random() 随机数
Math.round() 四舍五入
Math.ceil() 向上取整
Math.floor() 向下取整
Math.max() 最大值
Math.min() 最小值
Math.PI 圆周率
Math.abs() 绝对值
Math.pow(x,y) x的y次方
*******
封装一个函数,实现随机数
//生成 [a,b] 的随机数
function random(a,b){
return Math.floor(Math.random() * (b - a + 1) + a)
}