摘要: // 通过ES6的new Set进行数组去重: // 1. 数字、字符串数组去重 let arr1 = [1, 2, 3, 1, 2, 3, '1', '1']; let newArr1 = [...new Set(arr1)]; console.log(newArr1); // [1, 2, 3, 阅读全文
posted @ 2020-10-19 21:42 fanmengfei 阅读(1563) 评论(0) 推荐(0) 编辑