method
last
last(...)
public
Register or
log in
to add new notes.
autonomous -
August 18, 2008
0 thanks
Last element of an array alternative
You can also access the last element of an array with -1
[ "w", "x", "y", "z" ][-1] #=> "z"

