Skip to content

Commit 5855c0f

Browse files
committed
Remove Duplicate values from the Array
1 parent 5354b45 commit 5855c0f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* Remove Duplicate values from the Array
3+
*/
4+
const duplicateValuesArray = [1, 2, 1, 4, 5, 1, 2, 7, 8, 1, 6, 8, 1, 7, 2, 5, 6, 6, 9, 8, 4, 5, 8, 2, 4, 6, 7, 3, 9];
5+
6+
const filteredArr = [...new Set(duplicateValuesArray)];
7+
8+
console.log(filteredArr);

0 commit comments

Comments
 (0)