map calls a provided callback function once for each element in an array, in order, and constructs a new array from the results. callback is invoked only for indexes of the array which have assigned values, including undefined.1) The
map() method creates a new array with the results of calling a provided function on every element in the calling array.