Ok guys, here is my code.
I've just started learning Generators in JS and I'm not quite sure I understrand them fully.
What I want to achieve:The last step (
yield arr) of the generator needs to return an array of the arguments passed to the
gen2.next() method.
If I decide to add a new
gen2.next('TEST') at the end of my code, it needs to be added to the returned array.
If my last call is empty, aka
gen2.next() I want the full array back.
Can anyone help me ? How should I start ? Any tips or anything ?
This post was edited by TaGueule on Oct 9 2018 02:53pm