xdash API Reference / take
Function: take()
take<
T
>(arr
,n
):T
[]
Defined in: src/array.ts:52
Returns the first n elements of an array
Type Parameters
T
T
Parameters
arr
T
[]
array to get the first n elements from
n
number
number of elements to get
Returns
T
[]
the first n elements of the array