I have a question on how I can change the index of a array element, so that it doesn\'t come at the 7. position but at position 2 instead...
Is there a function to h
Isn't better to use:
irb> a = [2,5,4,6] #=> [2, 5, 4, 6] irb> a.insert(1, a.pop) #=> [2, 6, 5, 4]
?