Jet interview question

write code to check if it is a palindrome