Understand and Create Iterators in JavaScript

Publicado em: 01 Outubro 2023
no canal de: Diogo Veigas
83
3

In this video, we'll explore the world of iterators and iterables in JavaScript, using metaphors to help you understand these complex concepts.
You'll learn about the difference between for of and for in loops and how to create custom iterators to use with these loops. While also showing you how to set up the next function and get enumerables from objects.
Using real-world examples, we'll demonstrate how to create an iterable class and sort an array of objects based on a property. Throughout the video, we'll also discuss best practices for working with iterators and iterables in JavaScript.
Whether you're a beginner or an experienced developer, this video will help you understand and create iterators in JavaScript.

00:00 Introduction
00:08 Summary
00:23 What are iterators
00:46 What are iterables
01:05 Metaphor for iterators and iterables
02:03 How to iterate through collections
06:48 How do iterators really work
08:01 How to extract an iterator
08:47 The next() function
10:05 How to loop through iterators
12:23 Create a custom iterator
16:47 First real world example
23:20 Second real world example
26:33 Extra tips
29:36 Conclusion

#javascript #iterator #iterable #loops

music by: creatormix.com
music also by: @FreeToUseMusic​


Nesta página do site você pode assistir ao vídeo on-line Understand and Create Iterators in JavaScript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Diogo Veigas 01 Outubro 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 83 vezes e gostou 3 espectadores. Boa visualização!