const arr1=[1,2,3,4,5,5]; const unique = arr1.filter((item, index, array)=> array.indexOf(item)===index ) console.log(unique)