Using a JavaScript Iterator

preview_player
Показать описание
A JavaScript Iterator allows you to move through a collection in a one-at-a-time fashion. In this tutorial we will look at how to set up and use an iterator.

For more resources on JavaScript:

Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:

New Mastering Regular Expressions in JavaScript:

Tutorials referred to in this video:

#javascript #AllThingsJavaScriptLLC
Рекомендации по теме
Комментарии
Автор

I really love your Javascript content it's rare! , I have good knowledge of JS but you make me look like absolute beginner :D , thx a lot !

iali
Автор

Seems powerful. I've been confused by symbols for quite some time now, so it was nice to see an example.

sebastiankumlin
Автор

Great video, as usual ! Youtube needs more tut creators like you :)

Quick tip: hitting the up arrow in console will run your last typed instruction :P

urssaf
Автор

I haven't used the iterator but I have used function* for generators. They both have the concept of retrieving a next value.

scarbotheblacksheep
Автор

great video man, keep going pls :]

aliciapeter
Автор

Can see this being especially useful in e-commerce type apps where you can control the bandwidth required and number of results produced. 10000 products? Just show the first 100 and pull the next batch as the user clicks next.

mervinmarias
Автор

You know, this would have been a nice feature if it was possble to go in reverse trough the iterator like you can with iterators in Java. I don't see much use of it without that function

TroenderTass
Автор

Very clear explanation, however are there any videos about creating custom iterators for the objects (which aren't iterable)?
With best regards,

artyomzingfeld
Автор

There is some code I borrowed from stackoverflow which I modified into a generator.
This code yields all possible permutations of the array one by one.
The link to the stackoverflow page:

aleksandregorov
Автор

JavaScript doesn't have a hasNext() on it? That's a bit disappointing.

unitiliomedia
join shbcf.ru