The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

What Does Ruby’s Array#shift do? – Stack Overflow

Posted by jpluimers on 2017/09/20

Once you learn that shift/unshift are like push/pop on the other end of the array, you can mentally drop the ‘f’ from the name of the methods to remember which one ‘dumps’ elements and which one ‘inserts’ them. :)

Source: What Does Ruby’s Array#shift do? – Stack Overflow [WayBack]

Via: Originally shared by This is why I Code

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.