Returns the first element of an array.
The array to query.
The first element of the array, or undefined if the array is empty.
undefined
head([1, 2, 3]);// → 1head([]);// → undefined Copy
head([1, 2, 3]);// → 1head([]);// → undefined
1.0.0
Returns the first element of an array.