数组去重 Array.prototype.mySelect=function(){ console.log(this); return this.filter(function(value,index,arr){ return arr.indexOf(value)===index; }) } let arr=[1,2,3,4,2]; // console.log([...arr]); console.log([...arr].mySelect());
点赞 评论

相关推荐

牛客网
牛客网在线编程
牛客网题解
牛客企业服务