Deprecated: Function create_function() is deprecated in /var/www/vhosts/ on line 70
JavaScript Generators Tutorial |
  • Friday , 4 December 2020

JavaScript Generators Tutorial

Code Canyon

Generators in JavaScript Explained

In this tutorial we will look iterators and generators.
– We understand iterators in JavaScript
– Look at a new property called symbol.iterators
– Look at practical use of iterators.

#javaScript #generators #interators
*My Udemy Courses

Follow me for technology updates

Help me translate this video.
Note: use to translate this video to your language. Let me know once you do that so i can give you credit. Thank you in advance.

Original source

3d Ocean

Related Posts


  1. Akshay Mhatre
    May 17, 2020 at 20:55

    Super Straight forward and highly simple to understand explanation of generator functions on the entire YouTube, great job !

  2. Ajay Agrawal
    May 17, 2020 at 20:55

    Impressed and subscribed just after this one.

  3. Akshay Khobragade
    May 17, 2020 at 20:55

    Great work. Thank you so much. 🙂

  4. Versiloff
    May 17, 2020 at 20:55

    Very well explained, thank you!

  5. self descipline
    May 17, 2020 at 20:55

    great tuto

  6. Dawid Tomsia
    May 17, 2020 at 20:55


  7. GoDGoRyGR
    May 17, 2020 at 20:55

    Thank you for your great videos! I would like to see a course from you about design patterns like the observer, singleton patterns and generaly how to structure efficiently and DRY an application by real world examples in react or vanilla js! Greetings from Greece!

  8. Imran Shaikh
    May 17, 2020 at 20:55

    Very nice !👍

  9. sparxmike
    May 17, 2020 at 20:55

    Nice and clean. Great video, thank you

  10. Hormel
    May 17, 2020 at 20:55

    I struggle to imagine a real world use case for this. The example you gave at the end could just as easily have been accomplished using async/await which would also be more readable and require fewer lines of code.

  11. Vinod Bhatt
    May 17, 2020 at 20:55


  12. Thays Santos
    May 17, 2020 at 20:55

    Very well explained. Everytime I need to learn something about javascript I know I can come to your channel and find it! 🙂

  13. Sagar Kalokhe
    May 17, 2020 at 20:55

    Really awesome

  14. מאנקיס - לימוד HTML 5 , פלאש , PHP , JAVA SCRIPT , CSS - עופר שלי מדריך / מורה פרטי
    May 17, 2020 at 20:55

    You explain this perfect! going to use it in Israel to explain my students and also giving your videos!!

  15. Amit Debadwar
    May 17, 2020 at 20:55

    Hi TechSith….I just want to say…I love watching your tutorials…very nice explanation with real-time example… really it's helping us a lot….

  16. Arun Nagar
    May 17, 2020 at 20:55

    What is the real life example of generators

  17. zoltobialozielony
    May 17, 2020 at 20:55

    Hi, thanks for your tutorial, but I have one question. This generators practical example with promises… why should I use generators instead of .then in Promises. It works the same :).


  18. Ulric Van statter
    May 17, 2020 at 20:55

    this guy is awesome.

  19. Thomas Gauperaa
    May 17, 2020 at 20:55

    Great, thank you!

    May 17, 2020 at 20:55

    We can do same with promises using async await then what is the difference?

  21. Honghu Lin
    May 17, 2020 at 20:55

    Hi Sir,

    For the last example you gave:

    function *generator(){
    yield request('url1');
    yield request('url2');

    This is an easier version for .then callback? Are there any differences between using .then and this method? Thank you for your video!!

  22. Cory Simmons
    May 17, 2020 at 20:55

    Thank you so much for your tutorials. Came for the memes, stayed for the dreams.

  23. Atif
    May 17, 2020 at 20:55

    Thanks for the wonderful explanation.

  24. Dhananjay Belhekar
    May 17, 2020 at 20:55


  25. EVAN HE
    May 17, 2020 at 20:55

    Could you also illustrate on passing an argument into the generator function via ".next(argument)"? I am very confused about this.

  26. Unknown Waters
    May 17, 2020 at 20:55

    Thanks. I wanted to learn Iterators and Generators so I could use Mongorito which makes extensive use of yield statements in its API.

    As an added bonus, I now know how to make my code cleaner with Generators.

  27. Ambica Bassetty
    May 17, 2020 at 20:55

    @techsith: Awesome! thank you for the video.

  28. Brian
    May 17, 2020 at 20:55

    Why can't I just do this?

    let iterator = i[Symbol.iterator]().next() //this just stays at array[0]

    Instead of console.log( everytime?

  29. Bob Allen
    May 17, 2020 at 20:55

    should I learn Angular2 or React?!! I'm so torn, help!

  30. Animesh Sharma
    May 17, 2020 at 20:55

    I have a doubt in generator example using promise : For this specific example of generator with promise, it seems i can do the such dependent url calls using only promise so that 2nd url call will happen until first finishes and use 1st url data in 2nd, so why do we use generator here ? Please correct me if i am wrong. Thanks for such excellent tutorials !

  31. Aquafina
    May 17, 2020 at 20:55

    please put this video after iterators tutorial in advanced javascript tutorial;

    also your channel is awesome, it covers a lot of things I was looking for after going from absolute basics to more advanced things – you explain them really straightforwardly

    iterators and generators might be just what I was looking for – I've got
    reocurring problem with iterate through arrays using for loop, and getting
    expected value after every iteration (not just when value of "i" reaches
    it's limit) – I have to write function for every case.

  32. Pinik Manob
    May 17, 2020 at 20:55

    let iterator = i [ Symbol.iterator ]() ;

    why wrapping Symbol.iterator within third brackets [ ] ?

  33. Harshwardhan Rathore
    May 17, 2020 at 20:55

    awesome videos man, thanks!!
    keep up the good work 🙂

  34. Akalya Mohan
    May 17, 2020 at 20:55

    Hi, your videos are very useful.
    I got corrected with the navigation menu issues.
    Thanks for your reply. Can you post some video for google map placing in a website javascript code?

  35. enima iffets
    May 17, 2020 at 20:55


  36. Vlad
    May 17, 2020 at 20:55

    Thanks! very useful!

    btw, why can I use "let iterator = i.Symbol.iterator()" and have to use let iterator = i[Symbol.iterator]()

    it gives error "VM257:1 Uncaught TypeError: Cannot read property 'iterator' of undefined
    at <anonymous>:1:24"

Leave A Comment

You must be logged in to post a comment.