Something I never know could be done.
[1,2,3,4,5].last(2) will return [4,5].
method Array#last(n) will return the last n element of the Array.
[1,2,3,4,5].last(2) will return [4,5].
method Array#last(n) will return the last n element of the Array.
Comments
Post a Comment