Перейти к содержимому

Iterable vs Enumerable in JavaScript

Steve Griffith - Prof3ssorSt3v3

0:00 / 0:00

Iterable vs Enumerable in JavaScript

22 163 просмотра · 8 л. назад
Steve Griffith - Prof3ssorSt3v3
105 тыс. подписчиков
22 163 просмотра · 8 л. назад
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.