set.drop()
Drop elements given a count.
Lazy loading: |
Description
The drop()
method drops count number of set elements beginning
at element[0].
The source set isn’t changed.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
count |
Yes |
Number of elements to drop. I count is greater than the set length, an empty set is returned. |
Examples
// `toSet()` converts an array to a set.
let set = [1, 2, 3, 4, 5].toSet()
set.drop(2)
{
data: [
3,
4,
5
]
}
Is this article helpful?
Tell Fauna how the article can be improved:
Visit Fauna's forums
or email docs@fauna.com
Thank you for your feedback!