Amazon interview question

Can you do a function to check a palindrome?