functions in map javascript

JavaScript
['elem', 'another', 'name'].map((value, index, originalArray) => { 
  console.log(.....)
});array.map(function(currentValue, index, arr), thisValue)const numbers = [1, 2, 3, 4, 5]; 

const bigNumbers = numbers.map(number => {
  return number * 10;
});const map = new Map();

function foo() {
 return "Hello World!"; 
}

map.set("foo", foo);

console.log(map.get("foo")()); // Output: "Hello World!
Source

Also in JavaScript: