Simple Algo "reverse"
Solution for reverse() in JS without .reverse()
Tags: replit, node