This way of removing duplicates is quite simple and elegant, thanks to the methods Array.filter() and Array.indexOf(). The Array.filter() method creates a new array from an existing one, which contains only the elements
that meet the filter criteria. The Array.indexOf() method, on the other hand, returns the index of the first element of an array whose value matches the one passed to it as a parameter....