write a function that accepts string and return a revesed copy in javascript 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