ES6 introduces four data structures-
Map by mapping a string key with an object. There were side effects of such hacks. Language support for such data structures was sorely needed.
ES6 supports standard dictionary data structures; we will look at more details around these in the next section.
Map allows arbitrary values as
keys are mapped to values. Maps allow fast access to values. Let's look at some examples of maps:
const m = new Map(); //Creates an empty Map m.set('first', ...