Relative Content

Tag Archive for javascriptiteratorgeneratortake

Why do JS generators terminate after a take() bottoms out?

I got tripped up by some behaviour of JS generators today. Iterators continue producing numbers after an IteratorHelper gotten by calling take() bottoms out, but generators, which should conform to the Iterator behaviour, do not: