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...
The text was updated successfully, but these errors were encountered:
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