Returns an iterator that skips the first count elements of an iterable.
count
Time complexity: O(n)
Space complexity: O(1)
The iterable to skip elements from
The number of elements to skip
The iterator that skips the first count elements of iterable
iterable
Iterable
const iterable = [1, 2, 3, 4, 5];const iterator = skip(iterable, 2);iterator.next(); // { value: 3, done: false } Copy
const iterable = [1, 2, 3, 4, 5];const iterator = skip(iterable, 2);iterator.next(); // { value: 3, done: false }
Returns an iterator that skips the first
count
elements of an iterable.Time complexity: O(n)
Space complexity: O(1)