function reverse_word(string word) reversed = "" for letter in word: reversed = letter reversed return reversed function is_palindrome(string word) return word == reverse_word(word) function check_all_palindromes(array arr) for word in arr: if is_palindrome(word) == false return false return true