Reversing a JavaScript array without .reverse() / code explanation

I was working on a problem on Codewars.com and I stumbled upon an interesting solution on StackOverflow. Someone was asking how to reverse an array WITHOUT using .reverse(). Here is one solution someone wrote: let reverse=a=>[…a].map(a.pop,a) I… Read more

Similar