Skip to content

Instantly share code, notes, and snippets.

@thejohnfreeman
Last active January 7, 2019 16:00
Show Gist options
  • Save thejohnfreeman/62cbca61cf70ea96631fa98d14d8ef6e to your computer and use it in GitHub Desktop.
Save thejohnfreeman/62cbca61cf70ea96631fa98d14d8ef6e to your computer and use it in GitHub Desktop.
const generator = g()
generator.next() // { value: 1, done: false }
generator.next() // { value: 2, done: false }
generator.next() // { value: 3, done: false }
generator.next(10) // { value: 11, done: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment