Setfilter Setconst arr = [1,1,2,2,3,3,3,4,4,5,6,7,7]const newArr = [...new Set(arr)] filterconst arr = [1,1,2,2,3,3,3,4,4,5,6,7,7]const newArr = arr.filter((item, index, arr) => { return arr.indexOf(item) === index})