自定义工具函数库(二) 数组相关
最终仓库:utils: 自定义工具库
以前的笔记:JS 数组常用的方法
1..../map.js">
const arr = [1, 2, 3, 4, 5];
// 自定义.../filter.js">
const arr = [1, 2, 3, 4, 5];
// 自定义.../find.js">
const arr = [1, 2, 3, 4, 5];
// 自定义...// return Array.from(set) // Array.from()可以通过可迭代对象(包括数组、Set等)创建一个新的数组
return [...set]; // 使用