~/talk

Javascript Generators

Talkat NG-BE 2021 Β· 2021-12-02..12-03Β· [javascript, angular]
slides:none on file

Covers JavaScript generator functions (function* and yield), how they work under the hood and how to use them in practice, with examples and patterns for asynchronous flow control and iterable protocols. Discusses interactions with promises, async/await, and how generators can simplify or structure complex code in modern JavaScript environments.

AI-written summary Β· about

  1. 0:00Intro
  2. 2:12Confy app (2015) - Redux-Sagas + generators
  3. 4:34Quick intro to generators
  4. 5:53What are iterables?
  5. 6:11What does it mean to be iterable?
  6. 7:26What is an iterator?
  7. 8:20for...of (under the hood)
  8. 10:12Generators and generator functions
  9. 11:49A simple generator function..
  10. 13:59for...of with generators
  11. 15:49Lazy (infinite) sequences (for...of)
  12. 16:45Fibonacci sequence ... again
  13. 17:38Reducing transformations
  14. 18:54Traversing trees
  15. 20:35Passing values into a generator
  16. 23:11Additional generator methods
  17. 23:36External control flow (throwing)
  18. 24:33External control flow (returning)
  19. 25:15Driving the state machine
  20. 25:34Instrumenting code (logging)
  21. 26:51Instrument code (mobx flow)
  22. 28:32Control flow: pausing a generator
  23. 29:43Control flow: cancelling a generator
  24. 33:52Further Reading
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark β€” the status bar button does the same
?
this help
esc
close this, then clear every filter β€” or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.