The functional approach to iteration is probably the main reason that programmers are initially attracted to the idea of functional programming. This is an extract from my newly published book, ...
An object is iterable if it defines an iteration behavior. It does this by implementing a method with the key Symbol.iterator: [Symbol.iterator](): A zero-argument function that returns an object ...