The return value is simply the same array. The code inside the
each block gets executed, but the calculated values are not returned.
In contrast, calling the array’s
map method returns a new array whose elements are the return values of each round of executing the
If you want to change the return value use map.
If you want to return the original return value use each.