Simple JavaScript solution. Run code snippet for demo.
function checkPalindrome(line){_x000D_
reverse_line=line.split("").reverse().join("");_x000D_
return line==reverse_line;_x000D_
}_x000D_
alert("checkPalindrome(radar): "+checkPalindrome("radar"));
_x000D_