The map() function of array object creates a new array with the results of calling a provided function on every element in this array. Use it for example to perform some operation on each element of array and create new array.
Syntax
This will produce following result
This will produce following result
This will produce following result