News for hackers. Stuff that matters.
Re:Ask HN: JS's for-of loop conceptually flawed, or is it ju... by antrion on Tuesday June 07, 2016 @04:17PM (#11857450)
How would you copy it then? I have tried the npm deep-copy library, but that didn't work (Symbol.Iterator isn't enumerable for example)

edit: I just thought, I could make a function, bind that to a variable and regen the generator again and again

Re:Ask HN: JS's for-of loop conceptually flawed, or is it ju... by detaro on Tuesday June 07, 2016 @04:35PM (#11857570)
if you can easily create a new instance, that's the way to go.