数组方法数组去重导出函数unique(arr){returnArray.from(newSet(arr));}生成数组[...Array(5)].map((_,i)=>{constnum=Math.random()returnnum})
一些常用的数组方法相关文章