The Iterator pattern provides a way to access elements of a collection sequentially without exposing its underlying representation, abstracting traversal logic.
The Iterator pattern is a behavioral design pattern that lets you traverse elements of a collection without exposing its underlying structure (array, tree, graph). JavaScript has built-in iterator protocol with Symbol.iterator and next(), making it a native part of the language. This pattern is fundamental to for...of, spread operator, Array.from(), and generator functions.