結果 : function to check palindrome in javascript