https://www.udemy.com/practical-javas...
Learn JavaScript from Scratch for just $10
JavaScript: Remove Duplicates from an Array using Magical JavaScript Objects (Key/Value Pairs)
We are using a temporary JavaScript Object to store the array items as keys and some integers as values. As keys are unique, when duplicate items are inserted into the Object, only one of them will be saved, hence removing the duplicates easily.
To know more about JavaScript Objects, see this video:
• JavaScript: The for...in Loop to Trav...