前端学习之内置对象Math
Math.floor(): 向下取整,往最小取值console.log(Math.floor(5.9));运行代码:Math.floor():往最大取值,向上取整 console.log(Math.ceil(1.002));运行代码:Math.random() 对象随机数方法 random()返回一个随机的小数 伪随机数在范围从0到小于1获取1-10之间随机整数 function getRandom(min, max) { return Mat...
原创
2022-04-04 21:20:15 ·
4460 阅读 ·
0 评论