Array#eachmethod iterates over the elements of the array and executes the provided block each time. However, it returns the original array unaffected.Array#mapwill return a new array of elements containing the values returned by the block it is provided. It also does not affect the original array