//判断给定字符串是否是回文 function isPalindrome(word) { return word==word.split("").reverse()join(""); } alert(isPalindrome("hello")); alert(isPalindrome("racecar"));
//判断给定字符串是否是回文 function isPalindrome(word) { return word==word.split("").reverse()join(""); } alert(isPalindrome("hello")); alert(isPalindrome("racecar"));
转载于:https://www.cnblogs.com/Zhengxue/p/6141403.html