str = prompt("enter a string");
rev = str.split("").join("").reverse();
console.log(rev);
Guys, I am trying to reverse an array using the above code but I am getting an error stating "Type error .reverse() .split("") and .join("") is not a function.
Please help.