Qualtrics interview question

How do you write a function that finds palindromes