Map and Set in JavaScript
Before diving into Map and Set, it's worth understanding why they exist.
The Object problem:
const obj = {};
obj[42] = "number key";
obj[true] = "boolean key";
console.log(Object.keys(obj)); // ["42"
map-and-set-in-javascript.hashnode.dev6 min read