xdashReadme | API


xdash / first

Function: first()

first<T>(arr): T

Returns the first element of an array

Type parameters

T

Parameters

arr: T[]

array to get the first element from

Returns

T

the first element of the array

Source

array.ts:15