let testArray = [1,2,3,1,3,4,1,1,2] let uniqueValues = [...new Set(testArray )]; The restult uniqueValues array will be [1,2,3,4]
We can use Set function for get the unique values from the array
let testArray = [1,2,3,1,3,4,1,1,2] let uniqueValues = [...new Set(testArray )]; The restult uniqueValues array will be [1,2,3,4]
We can use Set function for get the unique values from the array