The iterable protocol allows JavaScript objects to define or customize their iteration behavior,
such as what values are looped over in a for..of construct. Some built-in types are built-in iterables
with a default iteration behavior, such as Array or Map, while other types (such as Object) are not.
The iterable protocol allows JavaScript objects to define or customize their iteration behavior, such as what values are looped over in a for..of construct. Some built-in types are built-in iterables with a default iteration behavior, such as Array or Map, while other types (such as Object) are not.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols