last-item
v2.0.0
Published
Get the last item in an array or other iterable.
Downloads
2
Readme
last-item
Get the last item in an array or other iterable.
Install
npm install last-item
Usage
import lastItem from 'last-item';
lastItem([1, 2, 3]);
//=> 3
API
lastItem(iterable)
iterable
Type: iterable
The array or other iterable to get the last item for.