CodingTrain / Suggestion-Box

A repo to track ideas for topics
573 stars 86 forks source link

ES6 Map and Set objects #859

Open Californ1a opened 6 years ago

Californ1a commented 6 years ago

When should each be used and what kind of data structures would require using them instead of typical objects or arrays.

As an aside, although this functionality isn't in the native ES6 Map, I particularly like the .find() functionality in this collection that extends the Map class where you're able to pass in a key/value pair and get the full object that contains that reference back. This sort of thing I find especially helpful for large nested objects (where a Map is most useful), and it is a fairly simple function to add to a class that extends Map since it's just one small loop to iterate through each item in the Map.

Anyway, I'd love to see a video on Maps, Sets, or other "Collection" types. Especially since these can also play really well into the higher-order functions that were looked at in a few videos recently.

shiffman commented 6 years ago

Oh, I would love to do this! This is especially relevant for my fall class so someone should remind me then if I don't get to it beforehand.