Skip to main content
grasp.study
Log in
Try it for free
Back to course
👋
Welcome to a Grasp lesson
Create a free account
to keep studying and create your own study path.
Advanced JavaScript concepts: Error
·
Module 2
Iteration Protocols and Generator Functions
1
Iterables vs. Iterators
Distinguish between the iterable and iterator protocols.
2
Manual Iterators with Symbol.iterator
Implement the iterator protocol manually on a custom object using Symbol.iterator.
3
Mastering Generator Functions: `function*` and `yield`
Create generator functions using 'function*' syntax and the 'yield' keyword.
4
Sending Data to Generators with `next(value)`
Pass values into a running generator using the 'next(value)' method for two-way communication.
5
Delegating Iteration with `yield*`
Delegate iteration to another iterable or generator using 'yield*'.
6
Handling Generator Errors with `throw()`
Implement error handling within a generator using the 'throw()' method.
7
Lazy Sequences with Generators
Build infinite sequences with lazy evaluation using generator functions.
8
From Manual Iterators to Generator Functions
Refactor a complex iteration from a manual iterator implementation to a more concise generator function.
Previous module
Symbols and Advanced Property Mechanics
Next module
Advanced Asynchronous Patterns