1 function reverseString(str) { 2 // 请把你的代码写在这里 3 var temp = []; 4 temp = str.split(""); 5 temp = temp.reverse(); 6 str = temp.join(""); 7 return str; 8 } 9 10 reverseString("hello");
Reverse a String-freecodecamp-js题目
原文:https://www.cnblogs.com/ahswch/p/9289728.html