DEV Community

Discussion on: Every developers 'oh my god I get it' moment.

Collapse
 
sait profile image
Sai gowtham

For reversing a string i used reduce methodπŸ€—

function strrev(str){
return [...str].reduce((acc,next)=>next+acc)
}
Collapse
 
dannetherton profile image
Dan Netherton πŸ‘¨β€πŸ’»

Nice!