WD interview question

Write code to check if string is a palindrome.