結果 : how to reverse string in javascript using for loop