Biz2Credit interview question

Basic Angular Question. Reverse of string with for loop