const data = [1, 2, 3, 2, 4, 3, 5];
const uniqueData = [...new Set(data)];
console.log(uniqueData);
// Output: [1, 2, 3, 4, 5]
The browser prints new Set() separately to see what it is:
const data = [1, 2, 3, 2, 4, 3, 5];
const uniqueData = [...new Set(data)];
console.log(uniqueData);
// Output: [1, 2, 3, 4, 5]
The browser prints new Set() separately to see what it is: