I have the following array [12,16,5,9,11,5,4]
it prints: 12,16,5,9,11,5,4
.
I want it to print: 4,5,11,9,5,16,12
When I did array.reverse
it printed:
4,5,11,9,5,61,21
It reversed individual numbers - any idea how I can stop that?
question from:https://stackoverflow.com/questions/5241185/reversing-the-order-of-an-array-in-ruby