function quchong(params){
const set=new Set(params);
var arr=[...set];
return arr
}
var a=[1,2,2,3,3,5];
console.log(quchong(a))
```
function quchong(params){
const set=new Set(params);
var arr=[...set];
return arr
}
var a=[1,2,2,3,3,5];
console.log(quchong(a))
```
本文标题:数组去重 面试必备哟
本文链接:https://www.haomeiwen.com/subject/fxfffxtx.html
网友评论