1var myMap = {};
2
3myMap[newKey] = newValue;
4
5// ...
6
7
8// Another method
9
10var myMap = new Map()
11myMap.set("key0","value")
12// ...
13myMap.has("key1"); // evaluates to false, assuming key1 wasn't set
1const map = new Map([
2 [1970, 'bell bottoms'],
3 [1980, 'leg warmers'],
4 [1990, 'flannel'],
5])
1// Map
2Map.prototype.forEach((value, key, map) = () => {}
3
4// Array
5Array.prototype.forEach((item, index, array) = () => {}