Using DevSculptor
Reading time: About .
TOC
»
»
Examples
Block Quotes and Admonitions
Code blocks
1
2
3
4
5
6
7
8
9
10
const testArray = [
"One", "Two", "Three", "Two", "Four",
"Five", "Four","Three", "One", "Five",
"Five", "Three", "Four", "One", "Two"
];
const delDuplicates = array => [...new Set(array)];
const result = delDuplicates(testArray);
console.log(result);
// Output:
// "One", "Two", "Three", "Four", "Five"
Widget is loading comments...