Ecom Experts interview question

walk through the code you wrote in the test task they give reverse array at last