js内置对象Math nibufan 2020-05-21 100 阅读1分钟 Math.floor(3.1)//向下取整 Math.ceil(3.1)//向上取整 Math.round(3.1)//四舍五入 Math.round(3.5) Math.abs(-3.5)//取绝对值 Math.pow(2,5)//2的五次方 Math.max(2,5,8,6,9)//取最大值 Math.min(2,5,8,6,9)//取最小值