ImpactQA interview question

Reverse the string using function