@leonetti/array-last-ts
v0.0.1
Published
Returns last element of array using TypeScript
Downloads
1
Readme
Last elements of Array using typesccript
get last elements from array using typescript.
Install
npm install @leonetti/array-last-ts
Usage
import {last} from '@leonetti/array-last-ts';
last(['a', 'b', 'c', 'd', 'e', 'f']);
//=> 'f'
last(['a', 'b', 'c', 'd', 'e', 'f'], 3);
//=> ['d', 'e', 'f']