is string reversible in javascript code example
Example 1: js revers string fucntion
return str.split("").reverse().join("");
Example 2: javascript reverse string
function reverseString(str) {
if (str === "")
return "";
else
return reverseString(str.substr(1)) + str.charAt(0);
}
reverseString("hello");