I want to use the map() function on a javascript array, but I would like it to operate in reverse order.
map()
The reason is, I\'m rendering stacked React co
Not mutating the array at all, here is a one-liner O(n) solution I came up with:
myArray.map((val, index, array) => array[array.length - 1 - index]);