In this lesson you will learn how to remove duplicates from the flat array which is a common coding challenge for beginner JavaScript interviews.
We will learn how to write a duplicate removal function using functional programming approach with reduce array method. You will see how we can remove duplicates by checking whether the accumulator in reduce already contains a value that is trying to be added to the resulting array.