first()

Gets the last element in an array or an array-like object.

This function is valid in v2.8.0 to v2.13.1. This function has been downloaded 22 times.

Parameter

{Array} array
The array or array-like object from which to pull the first element.

Returns

{*}
The first value of array.

Required Function

This function requires the following function which is included automatically:

  • nth()
    Gets the value at the specified position in an array or an array-like object.