📅  最后修改于: 2022-03-11 15:01:25.007000             🧑  作者: Mango
function reverseString(str) {
var newString = "";
for (var i = str.length - 1; i >= 0; i--) {
newString += str[i];
}
return newString;
}
console.log(reverseString('welcome'));