Comment on Why I Like Using Maps (and WeakMaps) for Handling DOM NodesComments−globalise833yNice! I have used Maps often for storing arbitrary key-value pairs, but until 5 minutes ago I didn't know you could use object references as keys. So this was a very good use of 5 mins.−beebeepka3ySame applies to Set, too. You can store an object, or instance, then use "has" to check for it.
Comments
Nice! I have used Maps often for storing arbitrary key-value pairs, but until 5 minutes ago I didn't know you could use object references as keys. So this was a very good use of 5 mins.
Same applies to Set, too. You can store an object, or instance, then use "has" to check for it.