| 1 | class Iterator { |
| 2 | |
| 3 | constructor(el) { |
| 4 | this.index = 0; |
| 5 | this.elements = el; |
| 6 | } |
| 7 | |
| 8 | next() { |
| 9 | return this.elements[this.index++]; |
| 10 | } |
| 11 | |
| 12 | hasNext() { |
| 13 | return this.index < this.elements.length; |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | export default Iterator; |
nothing calls this directly
no outgoing calls
no test coverage detected