摘要: 整理目前所用过的数组方法,学习了新增的es6方法。 1 arr.push() 从后面添加元素,返回值为添加完后的数组的长度 let arr = [1,2,3,4,5] console.log(arr.push(5)) // 6 console.log(arr) // [1,2,3,4,5,5] 2  阅读全文
posted @ 2020-12-11 14:00 {前端开发} 阅读(112) 评论(0) 推荐(1) 编辑