Look at the source, & the console this is an example of using Maps in JavaScript
Note: this code uses the Map object not the Array map method