1. Array.from(new Set(arr)) //推荐
2. function unlink(arr) {
return arr.filter(function (item, index, arr) {
return arr.indexOf(item, 0) === index;
});
}
jason-数组去重
最新推荐文章于 2023-09-25 14:11:14 发布
1. Array.from(new Set(arr)) //推荐
2. function unlink(arr) {
return arr.filter(function (item, index, arr) {
return arr.indexOf(item, 0) === index;
});
}