Seriously?!
It DOES do that
look at the output.
So why is that code showing as doing what it’s supposed to in a code pad but not passing?
**Your code so far**
function reverseString(str) {
let reversed = [];
for (let i = (str.length - 1); i >= 0; i--) {
reversed.push(str[i]);
}
str = reversed.toString();
return str;
}
reverseString("hello");
**Your browser information:**
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0
Challenge: Reverse a String
Link to the challenge: