xdash / take
Function: take()
take<
T>(arr,n):T[]
Returns the first n elements of an array
Type parameters
• 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