Looping through Arrays and Iterables - JavaScript Tutorial
Автор: dcode
Загружено: 2018-02-01
Просмотров: 1146
Описание:
You can use the for...of (For Of) Loop in Javascript to iterate over an iteratable object (i.e. Arrays, Strings, HTMLCollections, Sets etc.). It is much cleaner and simpler than the previous method of achieving the same result - the typical index at 0 and so on method.
In this video we go over a couple of examples of the for...of loop in use - including on Arrays, Strings and a NodeList.
After recording this video I realised that querySelectorAll actually returns a NodeList and not a HTMLCollection - it works either way :)
For your reference:
https://developer.mozilla.org/en-US/d...
https://developer.mozilla.org/en-US/d...
Follow me on Twitter @dcode!
If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: