What Does Ruby’s Array#shift do? – Stack Overflow
Posted by jpluimers on 2017/09/20
Once you learn that
shift/unshiftare likepush/popon 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
Need a good memory hook to remember what shift and unshift do in programming languages like Ruby or Perl? Jeroen Wiert Pluimers – Google+
https://stackoverflow.com/questions/3718625/what-does-rubys-arrayshift-do
https://stackoverflow.com/questions/3718625/what-does-rubys-arrayshift-do






Leave a comment