array = [1, 2, 3]
array.last
@numbers = [ 1, 2, 3, 4, 5, 6, 7, 8 ]
@numbers.last(2) # => [7,8]
a[-1] # => 5
b[-1] # => 6
a = [1, 2, 3, 4, 5]
a.last # => 5
a[-1] # => 5
array = [1, 2, 3]
array[-1]
@numbers = [ 1, 2, 3, 4, 5, 6, 7, 8 ]
@numbers.last(2) # => [7,8]
# or
@numbers.pop(2) #=> [7, 8]