<script>
//1.向下取整
console.log(Math.floor(1.1));//1
console.log(Math.floor(1.9));//1
//2.向上取整
console.log(Math.ceil(1.1));//2
console.log(Math.ceil(1.9));//2
//3.Math.round() 四舍五入 除了-5
console.log(Math.round(1.1));//1
console.log(Math.round(1.5));//2
console.log(Math.round(1.9));//2
console.log(Math.round(-1.1));//-1
console.log(Math.round(-1.5));//-1
console.log(Math.round(-1.9));//-2
</script>