Edit This Page

toIterator()

Create a new Iterator from an Enumerable.

Returns

(Iterator): New Iterator created from an Enumerable.

Example

const iterator = Enumerable
                  .from([1, 2, 3])
                  .toIterator();
// iterator.next().value = 1
// iterator.next().value = 2
// iterator.next().value = 3