📜  number round - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:35.007000             🧑  作者: Mango

代码示例1
// There are many ways of rounding...
Math.ceil(5.5) // Answer 6, rounds up.
Math.round(5.5) // Answer 6, rounds to the closest whole number.
Math.floor(5.5) // Answer 5, rounds down.