Gets the first element of array.
array
5.5.0
[[head]]
first([1, 2, 3]);// => 1first([]);// => undefined Copy
first([1, 2, 3]);// => 1first([]);// => undefined
The array to query.
Returns the first element of array.
Gets the first element of
array
.Since
5.5.0
See
[[head]]
Example