WorkWave interview question

Write code to reverse a string