Рет қаралды 2,298
We take a look at Async Generators in Javascript together. This builds on the concept of synchronous generators that we looked at earlier and allow us to work with promises in generators in a consistent and easy way. We also compare these new async generators to regular generators that return promises.
We see how we can use the new for-await-of loop to easily loop through async generator objects as well.
This is part of a series where we go over Javascript in depth to learn programming concepts as well as web development: • Javascript In Depth
Chapters:
00:00 Introduction
00:29 Iterable Recap
01:06 For..Of Loop Recap
01:31 Generator Recap
02:10 Generator For Of Loop
03:02 Generators and Promises
04:02 Generator Promise Code Example
17:04 Async Generator Syntax
18:06 Async Generator Code Example
25:00 Infinite Async Generators
33:16 Async Generator Return Keyword
34:20 Async Generator Yield Delegation
35:55 Next Steps
📦 Github Repository with the notes and exercise code+solutions: github.com/Nooder/javascript-...
💬 Come join us on Discord to chat with a like-minded community about tech and learning: / discord
🏅Support the channel and content through Super Thanks, Channel Memberships, or on Patreon: / techwithnader