摘要: 方法一: 求数组最大值:Math.max.apply(null,arr); 求数组最大值:Math.max.apply(null,arr); var arr = [3,43,23,45,65,90];var max = Math.max.apply(null,arr);console.log(max 阅读全文
posted @ 2019-03-16 22:55 每天都要进步一点点 阅读(444) 评论(0) 推荐(0)
摘要: 方法一: 结果如下: [0, 2, 3, 4] 方法二: 结果为:[2, 3, 4, 5, 6] 方法三: 结果为:[2, 3, 4, 5, 6] 方法四: 结果为:[1, 2, 3, 4] 方法五:ES6 提供了新的数据结构 Set。它类似于数组,但是成员的值都是唯一的,没有重复的值。 结果为:[ 阅读全文
posted @ 2019-03-16 00:08 每天都要进步一点点 阅读(709) 评论(0) 推荐(0)