Create exercise 6

This commit is contained in:
LSvekis
2021-09-06 12:19:06 -04:00
committed by GitHub
parent 8cfc035f5a
commit 85ba632104
+6
View File
@@ -0,0 +1,6 @@
const arr = ["Laurence", "Mike", "Larry", "Kim", "Joanne", "Laurence", "Mike", "Laurence", "Mike", "Laurence", "Mike"];
const arr2 = arr.filter ( (value, index, array) => {
console.log(value,index,array.indexOf(value));
return array.indexOf(value) === index
});
console.log(arr2);