Skip to content

Latest commit

 

History

History
33 lines (21 loc) · 504 Bytes

drop.md

File metadata and controls

33 lines (21 loc) · 504 Bytes

arrays.drop

drop(array, [count=1])

Remove N items from the beginning of the input array

Arguments

  1. array (Array): input array
  2. [count=1] (number): number of items to drop

Returns

(Array): input array sans the dropped items

Example

const result = arrays.drop([1, 2, 3], 2);
console.log(result);
> [3]