Skip to content

Commit

Permalink
Update index.md
Browse files Browse the repository at this point in the history
Fix wrong generator function call. calling "g4" instead of "g3"
  • Loading branch information
Urchmaney authored Jan 12, 2025
1 parent 0838df3 commit 53daa2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async function* g3() {
yield* g2();
}

const gen = g4();
const gen = g3();

console.log(await gen.next()); // {value: "foo", done: false}
console.log(await gen.next()); // {value: "bar", done: false}
Expand Down

0 comments on commit 53daa2c

Please sign in to comment.