_.head(array)
Gets the first element of array
.
Since
0.1.0
Aliases
_.first
Arguments
array
(Array): The array to query.
Returns
(*): Returns the first element of array
.
Example
_.head([1, 2, 3]); // => 1 _.head([]); // => undefined