DEV Community

Discussion on: Reverse a String - Four JavaScript Solutions

Collapse
 
leobm profile image
Felix Wittmann • Edited

certainly not very fast, but I'd like destructuring assignment and recursion :)

let reverse = ([h,...r]) => r.length>0 && reverse(r)+h || h;