What Does Ruby's Array#shift do?

Viewed 56467

I am having a hard time understanding what the shift and unshift methods of the Array class do in Ruby. Can somebody help me understand what they do?

5 Answers
Related