Iterators in JavaScript are a fairly newish feature which define a sequence to iterate over, for instance the for...of syntax in arrays. This means you don’t have to manually write for loops to go through items in sequences, but also means you can write your own logic so you can iterate over things other than arrays, or iterate in a custom fashion.

It turns out that Javascript array iterators are lazy, so in theory could be more efficient than Array functions which are eager and create intermediate arrays. For example

 const items = [1,2,3,4,5,6,7,8,9,10];
 const transform = items
                    .filter(i => i % 2 === 0)
                    .map(n => n * 2);

is the same as

 const items = [1,2,3,4,5,6,7,8,9,10];
 const filtered = items.filter(i => i % 2 === 0);
 const mapped = filtered.map(n => n * 2);

but with iterators this should only create one array at the end, so should use less memory:

 const items = [1,2,3,4,5,6,7,8,9,10];
 const iterTransform = items
                        .values()
                        .filter(i => i % 2 === 0)
                        .map(n => n * 2)
                        .toArray();

However iterator filters aren’t supported everywhere yet and it seems to have worse performance, so this is more one to watch right now.