UNPKG

@tommymynnson/lotide

Version:

A mini clone of the [Lodash](https://lodash.com) library.

15 lines (12 loc) 258 B
const tail = (anArray) => { let tail = []; if (anArray.length === 0 || anArray.length === 1) { return tail; } else { for (let i = 1; i < anArray.length; i++) { tail.push(anArray[i]); } return tail; } }; module.exports = tail;