texte inversé javascrip
//more compact way:
"my example text".split("").reverse().join("");
Shiny Swan
//more compact way:
"my example text".split("").reverse().join("");
"this is a test string".split("").reverse().join("");
//"gnirts tset a si siht"
//as a function
function reverseString(string){
return string.split("").reverse().join("");}
reverseString("test string");
//"gnirts tset"
"this is a test string".split("").reverse().join("");
return str.split("").reverse().join("");
function reverseString(str) {
return str.split("").reverse().join("");
}
reverseString("hello");
const solution = (str) => str.split("").reverse().join("");