Date:

Date.now()	//获取当前时间毫秒
var dt = new Date()
dt.getTime() //获取dt的毫秒
dt.getFullYear() //获取dt的年
dt.getMonth() //月0-11
dt.getDate()	//日0-31
dt.getHours() //时0-23
dt.gtMinutes() //分0-59
dt.getSeconds() //秒0-59

Math:

Math.random()

数组API

1.forEach  遍历所有元素
2.every  判断所有元素是否都符合条件
3.some  判断是否有至少一个元素符合条件
4.sort  排序
5.map 对元素重新组装,生成新数组
6.filter 过滤符合条件的元素

Date、Math、数组API、对象API
Date、Math、数组API、对象API
Date、Math、数组API、对象API
Date、Math、数组API、对象API
Date、Math、数组API、对象API
eg:获取随机数,要求是长10的字符串格式
Date、Math、数组API、对象API

对象API:

Date、Math、数组API、对象API

相关文章: