In ES6, what happens to the arguments in the first call to an iterator’s `next` method?

Try:

var g = f();
// this question is over this value.
g.next(); // returns: { value: 1, done: false }
g.next(123); // returns: { value: 2, done: false }
g.next(456); // returns: { value: [123, 456], done: true }

Leave a Comment