Returns the first item of an array.
at
firstItem([1, 2, 3]); // => 1firstItem([]); // => undefined Copy
firstItem([1, 2, 3]); // => 1firstItem([]); // => undefined
The first item of the array, or undefined if the array is empty.
undefined
Returns the first item of an array.
See
at
Example