JS
See the Pen thecodelog.com - ES6 Maps 1 by Deano (@deangilewicz) on CodePen.
The Map() constructor can also receive an iterable which must produce a list of arrays, where the first item in each array is the key and the second item is the value.
See the Pen thecodelog.com - ES6 Maps 2 by Deano (@deangilewicz) on CodePen.
Since you are able to set an object as the key, using a Map can be very beneficial when storing metadata about something e.g. an element.
See the Pen thecodelog.com - ES6 Maps 3 by Deano (@deangilewicz) on CodePen.