JS: Iterator.prototype
What is Iterator.prototype
Allow all standard Iterable objects to have methods such as map, forEach, filter, etc, without having to convert to array first. Similarly, modify given Iterator to return a new iterator.
Properties
constructor-
value is
Iteratorconsole.assert(Iterator.prototype.constructor === Iterator);
- JS: Iterator.prototype.map
- JS: Iterator.prototype.forEach
- JS: Iterator.prototype.filter
- JS: Iterator.prototype.reduce
- JS: Iterator.prototype.take
- JS: Iterator.prototype.drop
- JS: Iterator.prototype.every
- JS: Iterator.prototype.some
- JS: Iterator.prototype.find
- JS: Iterator.prototype.flatMap
- JS: Iterator.prototype.toArray
Symbol.iteratorSymbol.toStringTag