Word typed in textbox appears backward (OLLEH, instead of HELLO)

An alternative way to check anagrams:

Split each word at '' to get a list of letters
Sort each list
If lists match, their words are anagrams.