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"
const str = 'JavaScript is awesome';
function reverseAString(str) {
return str.split('').reverse().join('');
}
console.log(`Reversed string is: ${reverseAString(str)}`);
function reverseString(str) {
return str.split("").reverse().join("");
}
reverseString("hello");
function reverseString(s){
return s.split("").reverse().join("");
}
reverseString("Hello");//"olleH"
const reverse = str => str.split('').reverse().join('');
reverse('hello world');
// Result: 'dlrow olleh'
function reverseString(str) {
return str
.split("")
.reverse()
.join("");
}