last-of-array
Return the last element in an array. Is tested.
Overview
The module can be used when you need a function that returns the last element of an array
Installing
npm i last-of-array --save-dev
Usage
Simply require the last-of-array
module. The export function can be used in any module you desire:
const last = ; ; // 1; // ['Ahad', 12, 10000]
TODO
- add more tests
Tests
npm test
Also supports the standards
JavaScript library, configure as follows:
"standard": { "ignore": [ "/test/test.js", "app.js" ] }
; // ==> returns a number, 5; // ==> returns a string, 'Ahad' // ==> returns only the last element, an array: 2e10
Related Modules
Contributing
Feel free to file an issue or bug.