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

Refactoring your JavaScript code with Grasp

There’s more to programming than just writing code. While unlikely, it is possible to write imperfect code the first time through, or have requirements change over time. In these cases, you have to refactor the code you’ve already written to fix mistakes ... (more…)

Read more »