An iterable is any object with a [Symbol.iterator]() method that returns an iterator: an object whose next() returns { value, done } records until done is true. Strings, arrays, typed arrays, Map, Set, arguments, generators and DOM collections such as NodeList are iterable; plain objects, WeakMap and WeakSet are not.

Prefer for...of over index loops: it works on every iterable and calls return() if you break. The asynchronous protocol, for await...of, is covered in Asynchronous Iteration.