Version: v0.8.1 - Beta.  We welcome contributors & feedback.

List.last

last($numItems=1) -> any

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)
//= (error)

See Also