Accenture interview question

Loop over an object How to reverse a string