Maps and WeakMaps with ES6

Jacob Carter
InstructorJacob Carter

Share this video with your friends

Send Tweet

A brief introduction to Maps and WeakMaps with ES6, the usage of and difference of Maps and WeakMaps.

Ron
Ron
~ 2 years ago

I'm not seeing much value in Map, since I can do an Object.keys(obj) or Object.entries(obj), etc.

Marcell Ciszek
Marcell Ciszek
~ a year ago

When should you use a week Map?

Lauro Silva
Lauro Silva
~ a year ago

One difference to Map objects is that WeakMap keys are not enumerable. If they were, the list would depend on the state of garbage collection, introducing non-determinism. One use case of WeakMap objects is to store private data for an object, or to hide implementation details.

Marcell Ciszek
Marcell Ciszek
~ a year ago

Thank Lauro , a really good explanation. Thank you