const numbers = [1 , 21, 21, 34 ,12 ,34 ,12]; const removeRepeatNumbers = array => [... new Set(array)] removeRepeatNumbers(numbers) // [ 1, 21, 34, 12 ]