initialize a map js

JavaScript
array.map((item) => {
  return item * 2
} // an example that will map through a a list of items and return a new array with the item multiplied by 2let map = new Map()
map['bla'] = 'blaa'
map['bla2'] = 'blaaa2'

console.log(map)  // Map { bla: 'blaa', bla2: 'blaaa2' }
['elem', 'another', 'name'].map((value, index, originalArray) => { 
  console.log(.....)
});
Source

Also in JavaScript: