Sets & Maps in JavaScript
When it comes to picking the right data structure, developers often invest significant time in choosing what should be implemented. A good data structure can simplify data operations, save time, and make code more comprehensive. Collections of data are commonly stored using Objects and Arrays. For storing keys/value pairs, developers use Objects, and for storing indexed lists, they use Arrays. Iterable objects in ECMAScript 2015 presented two new types: Maps and Sets in JavaScript.