GlobalLogic Interview Question

Write a function to reverse the string?