first()

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

This function is valid in v2.8.0 to v2.24.3. This function has been downloaded 60 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 directly requires the following function which is included automatically:

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