Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Why won't yield return from within a `.map` callback? #1186
I'm going to guess the answer is just
Even my editor knows this is a terrible idea...
I started a question on Stack Overflow: Why won't yield return from within a
I hope that's not bad form
Hi everyone. What a good question.
Yes, MDN - Iteration Protocol doesn't refer directly about
Array.prototype.map doesn't have default iteration behavior, so we couldn't iterate through it.
But generators is not just iterators. Every generator is an iterator, but not vice versa. Generators allows you to customize iteration (and not only) process by calling