![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
前端
文章平均质量分 86
xingnan.
这个作者很懒,什么都没留下…
展开
-
day5-Math对象
一、Math 对象JavaScript Math 对象允许您对数字执行数学任务。1.1、Math.round()Math.round(x) 的返回值是 x 四舍五入为最接近的整数:Math.round(6.8); // 返回 7Math.round(2.3); // 返回 21.2、Math.pow()Math.pow(x, y) 的返回值是 x 的 y 次幂:Math.pow(8, 2); // 返回 641.3、Math.sqrt()Math.sqr...原创 2021-06-10 15:56:45 · 207 阅读 · 0 评论 -
day5-时间对象Date
一、创建 Date 对象什么是Date对象:Date对象用来处理日期和时间Date 对象由新的 Date() 构造函数创建。有 4 种方法创建新的日期对象:new Date()new Date(year, month, day, hours, minutes, seconds, milliseconds) new Date(milliseconds) new Date(date string) 1.1、new Date()new Date() :Date对象会自...原创 2021-06-10 15:49:05 · 310 阅读 · 0 评论