let a = [10,20,30,10,30]; let b = a.filter((item,index) => a.indexOf(item) === index); console.log(b);