revarse js string code example
Example 1: js revers string fucntion
return str.split("").reverse().join("");
Example 2: reverse string js
str.split('').reduce((reversed, character) =>{
return character + reversed;
}, '');
//apple = leppa
return str.split("").reverse().join("");
str.split('').reduce((reversed, character) =>{
return character + reversed;
}, '');
//apple = leppa