Pass a value to a generator
basics: get the values from a generator in two ways
pass a value to the iterator
a value passed to the 1st next()
call is ignored
Links
The part in the spec, that describes how a generator resumes.
Required Knowledge
- `let` declaration (Block scope)
- creation (Generator)
- iterator (Generator)
- yield expressions (Generator)
Related Katas
Generator
- creation
- iterator
- yield expressions
- send value to a generator
- send function to a generator
return
inside a generator function
Difficulty Level
ADVANCED
First Published
18 June 2015
Stats
3 tests to solve