Description

Create a slice of array with 'n' elements dropped from the beginning.

Syntax

drop(array, n)

Parameters

Input ParameterTypeDescription
arrayArrayThe array to query
nnumberThe number of elements to drop

Return value

Type
Array<any>

Sample

ExampleResultDescription
drop([1, 2, 3], 1)[2, 3]Drop the first element
drop([1, 2, 3], 2)[3]Drop first two elements

To view all the List functions, click here.