Рет қаралды 20,819
Iterable and Enumerable are different things in JavaScript.
When you add properties to an object they can be defined as enumerable or not.
Some object types like Arrays, Strings, Maps, Sets, and NodeLists also have Iterators which are objects that let you access certain values from the object.
This video discusses the difference between the two and how the for...in and for...of loops take advantage of the difference.