Math方法

var values=[1,2,3,4,5,56];
var a=Math.max.apply(this,values);
Math.ceil();//向上四舍五入
Math.floor();//向下四舍五入
Math.round();//正常四舍五入

Math.random();//0~1的一个小数

原文地址:https://www.cnblogs.com/vhyc/p/5767577.html