map functions makes this possible.
The code does a basic filter which is akin to a for..loop where you return true or false to remove or keep the item. We can use the
map method to create a temporary array, then we use the
indexOf method to see if we can find the same object inside of our map. If we do, then we know it is a duplicate.
Nothing overly fancy or complicated here, but undoubtedly useful.