write javascript function to 1 reverse a given string code example
Example: reverse string js
str.split('').reduce((reversed, character) =>{
return character + reversed;
}, '');
//apple = leppa
str.split('').reduce((reversed, character) =>{
return character + reversed;
}, '');
//apple = leppa