Version: v0.5.1 - Beta.  We welcome contributors & feedback.  THanks!

List.last

last(numItems = 1)

Description

Return the last item or the last numItems items in the List.

['a', 'b', 'c'].last();
//= 'c'

['a', 'b', 'c'].last(2);
//= ['b', 'c']

['a', 'b', 'c'].last(5);
//= ['a', 'b', 'c']

See Also