javascript reverter uma string
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
Grepper
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
//more compact way:
"my example text".split("").reverse().join("");
return str.split("").reverse().join("");
const solution = (str) => str.split("").reverse().join("");
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"