javascript removing duplicates in array

Solutions on MaxInterview for javascript removing duplicates in array by the best coders in the world

showing results for - "javascript removing duplicates in array"
Marla
13 Jan 2018
1const array = [1, 1, 2, 3, 5, 5, 1]
2const uniqueArray = [...new Set(array)];
3
4console.log(uniqueArray); // Output: [1, 2, 3, 5]
5