摘要: 1.Math对象的属性 2.min()和max()方法 console.log(Math.max(4,85,3))//=>85 let arr = [2,6,8,2,120]; console.log(Math.max.apply(Math,arr))//=>120 3.舍入方法 Math.ceil 阅读全文
posted @ 2019-12-24 22:30 LPEIL 阅读(270) 评论(0) 推荐(0) 编辑
摘要: Number类型: toFixed():会按照指定的小数位返回数值的字符串表示 console.log(23.25.toFixed(1))//=>23.3 toExponential():该方法返回以指数表示法表示的数值的字符串形式。toExponential()也接收一个参数,而已该参数同样也是指 阅读全文
posted @ 2019-12-24 22:19 LPEIL 阅读(341) 评论(0) 推荐(0) 编辑