last()

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
Array or array-like object from which to retrieve the last value.

Returns

{*}
The last value in 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.