Q: break terminates the iterator in for ... of loop Why does the break terminates the iterator returned by foo? We use break   to terminate the loop, but why does it kill the iterator too? Is it just how it is, or am I missing a point?


function* foo(){
      yield 1;
      yield 2;
}

let myIterator = foo()
    
for (let o of myIterator) {
   console.log(o);
   break; // closes iterator, triggers return
}

for(let of of myIterator) {
   console.log(o)
}


Thank you very much in advance!
