Tell us what’s happening:
i don’t undestand what is the problem, when i test the code on console i received the right answer
function reverseString(str) {
return str.split(’’).reverse();
}
reverseString(“hello”);
(5) [“o”, “l”, “l”, “e”, “h”]
Your code so far
function reverseString(str) {
return str.split('').reverse();
}
reverseString("hello");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/reverse-a-string