Standard built-ins
Iterator.prototype.drop()
Lazily skips the specified number of initial values. The limit is converted to Number and then truncated to an integer (or Infinity); NaN or a negative resulting integer throws RangeError.
Formal Syntax & Structure
javascript syntaxjavascript
iterator.drop(limit)Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| limit | number | Nonnegative count; converted to integer or Infinity. |
Return Value
Iterator
Result of the operation.
Working Example
Example Snippetjavascript
console.log(JSON.stringify(Iterator.from([1,2,3]).drop(2).toArray()));