_.last

_.last(array)

source npm package

Gets the last element of array.

Since

0.1.0

Arguments

  1. array (Array): The array to query.

Returns

(*): Returns the last element of array.

Example

_.last([1, 2, 3]);
// => 3