Lets say I have an array
[0, 132, 432, 342, 234]
What is the easiest way to get rid of the first element? (0)
You can use Array.delete_at(0) method which will delete first element.
x = [2,3,4,11,0] x.delete_at(0) unless x.empty? # [3,4,11,0]