Distribute the operator to eliminate duplicate values, with javascript we only need to write one line of code like this:
const arr = [1, 2, 3, 2, 3, 1];
const newArr = [...new Set(arr)];
console.log(newArr); // 123
Thanks for reading me ❤️
Distribute the operator to eliminate duplicate values, with javascript we only need to write one line of code like this:
const arr = [1, 2, 3, 2, 3, 1];
const newArr = [...new Set(arr)];
console.log(newArr); // 123
Thanks for reading me ❤️