let arr = [1, 7, 8, 9, 10, 20, 33, 0, 20, 7, 1] console.log([... new Set(arr)] // Output : [1, 7, 8, 9, 10, 20, 33, 0]