last()

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

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

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