ES6 introduced the Map data structure, providing us a proper tool to handle this kind of data organization. What is a Map? It's a data structure that allows to associate data to a key. A WeakMap is a special kind of Map that lets all its items be freely collected.
Table of contents
What is a MapBefore ES6Enter MapInitialize a map with valuesMap keysWeird situations you’ll almost never find in real lifeIterating over a mapConvert to array1 Comment
Sort: