Given the array

const arr = [0, 0, 0, 1, 2, 3, 3, 3, 4]

using Set we can create an array with only unique values in it

const uniqueArr = [...new Set(arr)] // [0, 1, 2, 3, 4]