The Code
The code is structured in three functions
getValues()
This function grabs the string input by the user.
reverseAString(userString)
This function will iterate through each item in the string reading back to front, and store each letter in a new, reversed array.
displayString(reversedString)
This function displays the reversed string in an alert box.