itertools.pairwise yields overlapping consecutive pairs from any iterable, and a deque+islice implementation generalises pairwise to non-sliceable iterables.
JavaScript For Everyone: Iterators - Smashing Magazine
Iterables implement a [Symbol.iterator]() method to produce iterators; iterators follow the iterator protocol and allow sequential element access (usable by for...of).