The code is structured in two functions:
getValue()
Collects a string that the user has input.
palindromeCheck()
uses a "for" loop to reverse the message, then checks if the reversed message matches the original message. It then displays the answer with a Sweet Alert.