function reverseString(str) {
var arr = str.split("");
console.log(arr);
arr.reverse();
console.log(arr);
var newstr = arr.join("");
console.log(newstr)
return newstr;
}
reverseString("hello");
Just want to spend this life happier.
function reverseString(str) {
Comments
Post a Comment