JS中的数学函数Math(提供的常用方法)

Math称为数学函数,但是它属于对象类型的 typefo Math //=> "object" abs aba:取绝对值 Math.abs(10) // => 10 Maht.abs(-10) //=> 10 ceil / floor ceil/floor:向上或向下取整 Math.ceil(10) //=> 10 Math.ceil(10.01) // =>11 Math.ceil(
相关文章
相关标签/搜索