From 7720c1c870837d6fd3d97e80be2bf31e79fb0bfd Mon Sep 17 00:00:00 2001 From: Karan <50290386+Sonawane-Karan26@users.noreply.github.com> Date: Fri, 3 Dec 2021 14:10:06 +0530 Subject: [PATCH] restructured --- Chapter 08/Exercise_8.2.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);