GlobalLogic interview question

Write a function to reverse the string?