CodingTrain / CodingTrain/Suggestion-Box
ES6 Map and Set objects
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 570
- Fork
- 85
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
When should each be used and what kind of data structures would require using them instead of typical objects or arrays.
* [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)
* [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set)
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](https://github.com/discordjs/discord.js/blob/a8172951d3d12feb59b8f0c6d77d23837b8f57e3/src/util/Collection.js#L191-L206) 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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con i riferimenti MDN collegati relativi a Map e Set e rivedi gli esempi e i casi d’uso descritti nell’issue. Definisci l’ambito del video in base a quando queste collezioni dovrebbero sostituire oggetti o array, includendo se è coperta l’estensione find-style suggerita; il lavoro è completato quando viene prodotto il contenuto didattico richiesto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript
- Ambito
- content
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100