diff --git a/Chapter 08/Exercise_8.2.js b/Chapter 08/Exercise_8.2.js index 4324c0b..830a430 100644 --- a/Chapter 08/Exercise_8.2.js +++ b/Chapter 08/Exercise_8.2.js @@ -1,6 +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 + return array.indexOf(value) === index; }); console.log(arr2);