When it comes to storing a collection of data, arrays probably come to mind first. They’ve been around forever, are very flexible, and contain a boatload of properties that make using them a breeze. Over the past few years, JavaScript gained another way to store a collection of data. That way is via this mysterious array-looking creature known as a Set. On the surface, arrays and sets look similar:
This is a companion discussion topic for the original entry at https://www.kirupa.com/javascript/sets.htm