The new Map() Method
You can create a map by passing an array to the new Map()
constructor:
Example
// Create a Map
const fruits = new Map([
["apples", 500],
["bananas", 300],
["oranges", 200]
]);
Map.get()
You get the value of a key in a map with the get()
method Continue reading JavaScript Map Methods