Tell us what’s happening:
what is the problemis not yet passing the tests
Your code so far
function reverseString(str) {
var reversedString="";
for(var i=str.lenth-1;i>=0;i--){
reversedString+=str[i];
}
return reversedString;
}
console.log(reverseString("hello"));
reverseString("Howdy");
reverseString("Greetings from Earth");
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
.
Challenge: Reverse a String
Link to the challenge: