This commit is contained in:
Karan 2021-11-25 19:54:22 +05:30 committed by GitHub
parent 1f324f6ca3
commit 1a3bc59a27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +0,0 @@
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);