1. parseInt()
// js内置函数,注意接受参数是string,所以调用该方法时存在类型转换
parseInt(1.5555) // => 1
2. Number.toFixed(0)
// 注意toFixed返回的字符串,若想获得整数还需要做类型转换
1.5555.toFixed(0) // => 1
3. Math.ceil()
// 向上取整
Math.ceil(1.5555) // => 2
4. Math.floor()
// 向下取整
Math.floor(1.5555) // => 1
5. Math.round()
// 四舍五入取整
Ma