Posted: 2024-02-29 14:30:00
Hi everyone, I'm having trouble with a simple JavaScript function. I'm trying to reverse a string, but it's not working as expected.
function reverseString(str) {
return str.split("").reverse().join("");
}
console.log(reverseString("hello"));