Nothing is paused yet when the first next() runs, so its argument is thrown away.
Acceptance criteria
- 1.#out should show undefined.
Nothing is paused yet when the first next() runs, so its argument is thrown away.
function* demo() { const first = yield "waiting"; return first; } const g = demo(); document.querySelector('#out').textContent = String(g.next("sent early").value);
Output ready when you are
Press Run to render your code, or Submit to validate your solution.