标签:bsp ons 结果 ceil math console 向上取整 取整 let
let num = 1.75
1.向上取整
let result = Math.round(num)
console.log(result) // 结果为 2
2.四舍五入
let result = Math.ceil(num)
console.log(result) // 结果为 2
3.向下取整
标签:bsp ons 结果 ceil math console 向上取整 取整 let
原文地址:https://www.cnblogs.com/caizetian/p/12179293.html