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

List.first

first(numItems = 1)

Description

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

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

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

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

See Also