Observe (CA) interview question

Write code to identify if a string is a palindrome