ES6 Generators

By Fanny Jiang

ES6 Generators

In this tech talk, Fanny Jiang introduces ES6 Generators and how they can be used to write asynchronous JavaScript. Fanny briefly introduces the Generator function structure and the unique yield and .next() features to pause and resume a function. She then shows an example of how Generators can be used in conjunction with JavaScript promises to make writing asynchronous functions cleaner, easier to read, and even look synchronous.

  • 163