illustration for Write simple asynchronous code with JavaScript generators

Write simple asynchronous code with JavaScript generators

Instructor

Max Stoiber
15m closed-captioning
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.4
3280
people completed
Bookmark
Download
RSS

Generators are a useful tool for handling asynchrony in your JavaScript applications. They were added to JavaScript with ES2015. When applied correctly they allow us to write asynchronous code that looks synchronous.

They also turn one of JavaScripts core paradigms on its head. Contrary to normal functions, generator functions can be paused and resumed at any arbitrary point in time with the yield keyword.

This course will walk you through the basics of generators so you’ll be able to use them in your applications without ripping your hair out!

Learner Reviews

  • mathias gheno
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What would make this course a 7 for you?

    I would like more examples. It was a nice introduction to the topic.

  • quinton
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    well put together, generators are taxing but this was very simple and easy to understand building on generators and a basic example of usage with promise...yay! :)

  • Jon
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    How will you use what you learned from this course?

    It's to know how generators worked but I don't understand their practical use case.

  • Andy
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What was your strongest take away from this course?

    I understood how to pass values back IN to a generator function. However, that last lesson on coroutines was a bunch of messy-looking code (to my eyes) without a real obvious practical application.

  • Tehranjs egghead
    4 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    I will suggest this tutorial to my friends whom they want to learn generators professionally.

    Thank you so much.

  • Piotr
    5 years ago
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    Star icon$$$
    What did you like about this course?

    great course - easy to understand description thanks to doing it step by step. Something on async generators would be nice too

Course Content

15m • 6 lessons

    You might also like these resources:

    illustration for Introduction to Cloudflare Workers

    Introduction to Cloudflare Workers

    Kristian Freeman・36m・Course

    Become familiar with the Workers CLI wrangler that we will use to bootstrap our Worker project. From there you'll understand how a Worker receives and returns requests/Responses. We will also build this serverless function locally for development and deploy it to a custom domain.

    illustration for Create an eCommerce Store with Next.js and Stripe Checkout

    Create an eCommerce Store with Next.js and Stripe Checkout

    Colby Fayock・1h 4m・Course

    This is a practical project based look at building a working e-commerce store using modern tools and APIs. Excellent for a weekend side-project for your developer project portfolio

    illustration for Practical Git for Everyday Professional Use

    Practical Git for Everyday Professional Use

    Trevor Miller・1h・Course

    git is a critical component in the modern web developers tool box. This course is a solid introduction and goes beyond the basics with some more advanced git commands you are sure to find useful.