WD Interview Question

Write code to check if string is a palindrome.