JavaScript ES6 Tutorial #11 - Generators

preview_player
Показать описание
Yo ninjas, in this Ecmascript 6 tutorial I'll introduce you to generators, and how we can use them to create what are essentially pause-able functions.

JavaScript generators can be used to good effect when writing asynchronous code.

----- COURSE LINKS:

---------------------------------------------------------------------------------------------
You can find more front-end development tutorials on CSS, HTML, JavaScript, jQuery, WordPress & more on the channel homepage...

========== JavaScript for Beginners Playlist ==========

============ CSS for Beginners Playlist =============

============== The Net Ninja =====================

================== Social Links ==================

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

I just watched 5 different videos on Generators. Most of them just showed a bunch of code that was doing something whatever api thing rambling on about asynchronous, api and what not. You just showed what a generator does with some absolute basic and familiar things on a low level. This way you didn't distract me from what a generator essentially does. For me this certainly was the best approach. Thank you very much. Well done!

ekkehardehrenstein
Автор

Just finished this the (sadly) last of your ES6 tutorials. You have a real gift for conveying these concepts, keep it up! Subbed, and will be checking out your other series.

cugamer
Автор

promises, recursion and generator in one example! 🔥

ladyking
Автор

I did not know that JS runs right to left, that's really useful insight.

baluditor
Автор

First - I love all your videos they are brilliant. This one is no different, a beautifully clear explanation.

With regards to your genWrapper function, I think it's worth noting that you have it processing the 3 AJAX requests sequentially rather than in parallel. To make a more efficient wrapper you could call all three get requests outside of the genWrapper, with a call to the genWrapper in the 'then' function passing the results into it. Of course you'd need to determine which result set was which in the wrapper but if you had 3 requests the code would only take as long as the slowest request rather than as long as all of them combined.

Thanks for all the great teaching.

HewieTheDev
Автор

Man I love your tutorials. I've been all over YT looking for an explanation of generators and most of them were trying to use an API and poorly explaining the generator itself. Great video. Really simple to understand.

garrenmiller
Автор

Top notch!! Thanks, I understand the generator itself but I didn't understand clearly until right now the use cases, and with this video, my brain just click!!! Thanks!! Now I can see the power of this thing!!

alexisdvt
Автор

Was struggling to execute the code until I realised I needed to link to a jQuery library in my index.html! Thank you again Dear Ninja Man for another classic cameo on JS

KG-fjex
Автор

I was thinking this was one of those rare videos where Shawn gave profound impact to your knowledge base without summoning the Ninjas, Yoshi, Ryu, and Crystal. But then I saw Yoshi as a facebook friend and my hopes were dashed.

ezekielsaturday
Автор

Hi Shaun, thank you so much for this tutorial with very valuable concepts on jscript. Your teaching skills are tremendous and very detailed. I would recommend this playlist for anyone who just finished the jscript basics tutorial. Stay cool.

charithfernando
Автор

I've just completed watching this bunch of tutorials: good stuff! Thanks a lot!!

rostyslavklyba
Автор

Thank you very much for this series of lessons! Your style of explanation is straightforward and informative!

mikhailsamotaev
Автор

Thanks, this playlist is short and sweet. Looking for the next one to learn from your amazing tutorial.

blissfulDew
Автор

Thanks a lot man. You made the basics clear. VERY CLEAR. Each and every chapter has something new to offer. Keep it up (y)

mayankgangwal
Автор

Great insight on the ES6 related topics.. quite helpful and time saving.. keep up the good work

MuhammadHamza-lfvu
Автор

To the point, simple and intuitive explanation, muchass graçiasss!

khumoyunakhmedov
Автор

Huge thanks for this playlist, I completed to watch it, well done!

manueljordan
Автор

You've done a very good job explaining this, thank you.

fadiliabdeljalil
Автор

Wow, The best explanation for Generators in the world. Net ninja Shaun we got to say this... "The greatest teacher of JavaScript ever to be born on the planet"...

codexperts
Автор

love your tutorials.. so very explained. thank you

lovesimpleton