UNPKG

@kowo0403hk/lotide

Version:

lotide library by LHL Bootcamp student

9 lines (8 loc) 187 B
const tail = function(arr) { if (!Array.isArray(arr)) { throw new Error("parameter has to be an array"); } let newArr = arr.slice(1); return newArr; }; module.exports = tail;