recursive javascript function to reverse a string code example
Example 1: js revers string fucntion
return str.split("").reverse().join("");
Example 2: how to reverse a string in javascript without using reverse method
function reverseString(str) {
return str.split("").reverse().join("");
}
reverseString("hello");