We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ed760b commit b1b9882Copy full SHA for b1b9882
javascript/remove_duplicates.js
@@ -0,0 +1,5 @@
1
+// Define array for duplicates to be removed
2
+const array = [2, 5, 2, 6, 8];
3
+// Create set from array (only adds non-duplicates) and print
4
+const unique = Array.from(new Set(array));
5
+console.log(unique);
0 commit comments