Math和Date對象

Math對象不用new  用的時候直接Math+屬性名 就行 例子:Math.random();//生成0到1的隨機數 可以等於0不能等於1 Math的7個常用方法 Math.random(),Math.round()//四捨五入,Math.max()//找尋max中傳入的最大值,Math.min()//找尋min中的最小值 Math.abs()//取絕對值 ,Math.floor()向下取整,M
相關文章
相關標籤/搜索