So judging by this solution, you can just treat strings as if they are arrays? There is no conversion required it seems… Odd.
function reverseString(str) {
let reversedStr = “”;
for (let i = str.length - 1; i >= 0; i–) {
reversedStr += str[i];
}
return reversedStr;
return str;
}
reverseString(“hello”);