The distinction between Map and Set becomes much clearer when you look at the problem each one solves. I especially like using Set when uniqueness is the main requirement, since it avoids having to manually check whether a value already exists.
For Map, the ability to use objects or other values as keys is really useful in situations where an object’s string-keyed properties would be limiting. The dedicated methods like has(), get(), and set() also make the intent pretty clear.
One thing worth remembering is that choosing Map or Set isn’t automatically about being “faster” than objects or arrays. The better choice usually depends on the data structure and operations your code actually needs.