3 ms·
>But in a generator function the iterator is returned immediately, before any of the code in the function runs, so how would it return anything else? Oh, that'
by TazeTSchnitzel 12y ago
>But in a generator function the iterator is returned immediately, before any of the code in the function runs, so how would it return anything else?
Oh, that's interesting, I didn't know ES6 implemented generators that way. That's really weird.
EDIT: Looks like PHP does the same thing. Hmm, I can see the merits of an asterisk, then.
- ptx 12y agoPython works the same way, so I just assumed ES6 did as well and tested it in Firefox. :)