javascript判断给定字符串是否是回文

//判断给定字符串是否是回文
    function isPalindrome(word) {
      return word==word.split("").reverse()join("");
    }
    
    alert(isPalindrome("hello"));
 
    alert(isPalindrome("racecar"));
好好学习,天天向上。
原文地址:https://www.cnblogs.com/Zhengxue/p/6141403.html