对于简单数组
Basic Number Array
举例
var a=[1,1,2,3,4,5,4]
a.filter((value,index,self)=>{return self.indexOf(value)===index})
对于对象数组
Object Array
举例
var item =[{a:1,b:1},{a:1,b:1},{a:1,b:1},{a:2,b:2}]
item.filter((value,index,self)=>{return self.findIndex(x=>x.a==value.a)===index})