Skip to content Skip to sidebar Skip to footer
Showing posts with the label Iterator

Javascript Iterator Class

Do you know a JavaScript library that implements a generic Iterator class for collections (be it Ar… Read more Javascript Iterator Class

Can I Make An Iterator With A Simple Function? (no Generator Or Symbol.iterator)

I have been trying to make an iterator using a plain function, without a generator or using the Sym… Read more Can I Make An Iterator With A Simple Function? (no Generator Or Symbol.iterator)

Is It Safe To Delete Elements In A Set While Iterating With For..of?

Is it specified that you can delete any element in an instance of Set while iterating using for..of… Read more Is It Safe To Delete Elements In A Set While Iterating With For..of?

What Is The Technical Definition Of A Javascript Iterable And How Do You Test For It?

I've been implementing a useful subclass of the ES6 Set object. For many of my new methods, I … Read more What Is The Technical Definition Of A Javascript Iterable And How Do You Test For It?

Why Do You Access Symbol.iterator Via Brackets?

If I created an array, for instance, var array=[1,2,3,4]; to return an iterator I would do var iter… Read more Why Do You Access Symbol.iterator Via Brackets?