-
Notifications
You must be signed in to change notification settings - Fork 0
array.Function.drop
soetas edited this page Nov 30, 2024
·
2 revisions
estdlib v0.1.2 / array / drop
drop<
T
>(array
,n
):void
Creates a slice of array with n elements dropped from the beginning
• T
Type of objects the array contains
• array: T
[]
The array to query
• n: number
= 1
The number of elements to drop
void
- Returns the slice of array
0.1.2
drop([1, 2, 3])
// => [2, 3]
drop([1, 2, 3], 2)
// => [3]
drop([1, 2, 3], 5)
// => []
drop([1, 2, 3], 0)
// => [1, 2, 3]
Docs made with by typedoc、typedoc-plugin-markdown & typedoc-github-wiki-theme.