摘要: 1、forEach 【1】例子:循环arr数组,将item为1的元素从数组中删除 let arr = [1, 1, 2] arr.forEach((item, index, arr) => { if (item == 1) { arr.splice(index, 1) } }) console.lo 阅读全文
posted @ 2020-06-09 17:38 小刺猬的大宝贝 阅读(21902) 评论(2) 推荐(1) 编辑