No video

JavaScript ES6 Tutorial #11 - Generators

  Рет қаралды 38,042

Net Ninja

Net Ninja

Күн бұрын

Пікірлер: 69
@ekkehardehrenstein180
@ekkehardehrenstein180 8 жыл бұрын
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!
@NetNinja
@NetNinja 8 жыл бұрын
Awh cool, glad it helped! Thanks for watching :D
@cugamer8862
@cugamer8862 7 жыл бұрын
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.
@ladyking83
@ladyking83 Жыл бұрын
promises, recursion and generator in one example! 🔥
@baluditor
@baluditor 3 жыл бұрын
I did not know that JS runs right to left, that's really useful insight.
@HewieTheDev
@HewieTheDev 6 жыл бұрын
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.
@garrenmiller2941
@garrenmiller2941 6 жыл бұрын
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.
@ezekielsaturday2637
@ezekielsaturday2637 4 жыл бұрын
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.
@NetNinja
@NetNinja 4 жыл бұрын
Haha, one day maybe :p
@KG-fj1ex
@KG-fj1ex 5 жыл бұрын
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
@alexisdvt
@alexisdvt 8 жыл бұрын
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!!
@ridl27
@ridl27 6 жыл бұрын
bro, I understand the generator but I dont see the real power of this thing for now, can you help me ?
@charithfernando
@charithfernando Жыл бұрын
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.
@NetNinja
@NetNinja Жыл бұрын
You're very welcome! Thanks for the kind words Charith :)
@rostyslavklyba1746
@rostyslavklyba1746 4 жыл бұрын
I've just completed watching this bunch of tutorials: good stuff! Thanks a lot!!
@Ahmedalaa-ls6zb
@Ahmedalaa-ls6zb 3 жыл бұрын
This video tutorial is a masterpiece
@mikhailsamotaev5605
@mikhailsamotaev5605 5 жыл бұрын
Thank you very much for this series of lessons! Your style of explanation is straightforward and informative!
@mayankgangwal24
@mayankgangwal24 6 жыл бұрын
Thanks a lot man. You made the basics clear. VERY CLEAR. Each and every chapter has something new to offer. Keep it up (y)
@blissfulDew
@blissfulDew 6 жыл бұрын
Thanks, this playlist is short and sweet. Looking for the next one to learn from your amazing tutorial.
@MuhammadHamza-lf5vu
@MuhammadHamza-lf5vu 5 жыл бұрын
Great insight on the ES6 related topics.. quite helpful and time saving.. keep up the good work
@khumoyunakhmedov4562
@khumoyunakhmedov4562 6 жыл бұрын
To the point, simple and intuitive explanation, muchass graçiasss!
@manueljordan317
@manueljordan317 3 жыл бұрын
Huge thanks for this playlist, I completed to watch it, well done!
@codexperts
@codexperts 6 жыл бұрын
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"...
@NetNinja
@NetNinja 6 жыл бұрын
Ha, thnks so much man :)
@fadiliabdeljalil770
@fadiliabdeljalil770 6 жыл бұрын
You've done a very good job explaining this, thank you.
@lovesimpleton8177
@lovesimpleton8177 5 жыл бұрын
love your tutorials.. so very explained. thank you
@enriquecarvajal7384
@enriquecarvajal7384 6 жыл бұрын
man thanks you good ! English its not my native language but you explain soo good ! so i learn a lot, thanks bro!
@suemendez5674
@suemendez5674 5 жыл бұрын
Thanks for the free lesson, Ninja Master.
Жыл бұрын
Awesome tutorial
@sanisan5787
@sanisan5787 5 жыл бұрын
I didn't understand the Ajax part (y did u mix up wd generators?) Rest all was fine...btw is this the last tutorial of es6?? I hv liked n subscribed. Thank you Shaun!!
@Canardeur
@Canardeur 6 жыл бұрын
Great thanks for this awesome series!
@mufaddalshabbirhusan2565
@mufaddalshabbirhusan2565 7 жыл бұрын
Great tutorials about ECMAScript 2015, do you have more tutorials planned = 12, 13 ? Thanks!
@KelvinWKiger
@KelvinWKiger 6 жыл бұрын
Damn, this - is - amazing! Thank you.
@myhendry
@myhendry 6 жыл бұрын
Excellent video!
@vnymachado
@vnymachado 6 жыл бұрын
Awesome playlist!
@GeorgiTapalilov
@GeorgiTapalilov 7 жыл бұрын
Great explanation
@josephmakram4342
@josephmakram4342 5 жыл бұрын
Shuan you awesome as usual thank you alot sir
@ahmedmabrouk9793
@ahmedmabrouk9793 7 жыл бұрын
well many thanks Shaun for your efforts .. I really learned a lot from you :) thanks a lot I just noticed that almost no one explained to use Ajax with ECMAScript6 yet .. specially when dealing with Laravel not plain php I searched for that for long long time and didn't catch any real results. I know Jquery make it simple especially when making a post request but .. I wanna do that with ecma6 .. I feel ecma6 make it easy to understand and deal with when you are coming from backend programing languages which make me feel I don't need to use jquery that much as I feel more comfortable with ecma6. may you give advise about that ? or even lead me to a resource can be useful about that point ? many thanks again and please accept my best regards :)
@hamzafaysal909
@hamzafaysal909 6 жыл бұрын
plz do a series on ajax & json... thanks for this informative series..
@olegbaranovskyy9685
@olegbaranovskyy9685 7 жыл бұрын
Thank, great video!
@DrNabeel20
@DrNabeel20 4 жыл бұрын
Thank you :D
@chin2km
@chin2km 7 жыл бұрын
this.is.the.best();
@les2997
@les2997 6 жыл бұрын
Good explanation!
@rutpshah
@rutpshah 7 жыл бұрын
Great tutorial! Please add few more examples in this video to get more detailed understanding.
8 жыл бұрын
yes 2 things please refresh page show how it looks then describe how it works and 2nd share your code examples next time plz :D other than that great vid :D
@ShahzaibKhan-li8wi
@ShahzaibKhan-li8wi 6 жыл бұрын
Is this series of tutorial enough to go for react tutorial or I need to learn other things to go on to react??
@Ak-iy5db
@Ak-iy5db 6 жыл бұрын
thank you bro. you explained well. Can you make a tutorial on ajax with servlet ?
@romanroman8848
@romanroman8848 7 жыл бұрын
shaun u r great! there is more videos of es6?
@khumoyunakhmedov4562
@khumoyunakhmedov4562 6 жыл бұрын
Could you please provide some simple example projects on github that uses generators, that would be good to examine and learn this feature in action
@AndricLibreSinn
@AndricLibreSinn 7 жыл бұрын
It would be great if you could do a video on how generators work within the JavaScript event loop. I feel like this is cheating the message queue but honestly I'm not 100% on how this even works.
@joaofnds
@joaofnds 8 жыл бұрын
You forgot a '1' in the title! This is lesson #11 ;)
@NetNinja
@NetNinja 8 жыл бұрын
+João Fernandes Well spotted - just making sure everyone is paying attention ;). Thanks!
@brockz24
@brockz24 6 жыл бұрын
In my project ,I get object error in Ajax calls often how can I fix
@mark123450024789
@mark123450024789 5 жыл бұрын
last bit where do u define yielded
@hamdyyoussef5110
@hamdyyoussef5110 4 жыл бұрын
Thank You
@pepeback
@pepeback 6 жыл бұрын
You didn´t show all the code in the last example, the most interesting one. I suppose you are missing one line: genWrapper(generator);
@violetpaw1593
@violetpaw1593 8 жыл бұрын
Can I Use This To put any item into a game?
@HardwareAddiction
@HardwareAddiction 7 жыл бұрын
It seems Async/Await would fit better in this case. It's based off generators of course. I guess support was lacking back in 2016.
@sweetbabyjesus1000
@sweetbabyjesus1000 6 жыл бұрын
I was watching this thinking the exact same thing ! I'm looking into redux-saga and it utilizes generators, it seems like a much more manual way of just using async / await ?
@kerwebayerlota7965
@kerwebayerlota7965 5 жыл бұрын
Hi Shaun, can you also make a tutorial on how to make a payroll system in php plz.
@MissECylon
@MissECylon 4 жыл бұрын
Is this still relevant? I mean, are generators still being used? And streams and monads?
@liam_iam
@liam_iam 3 жыл бұрын
from what I know so far about Promises, it seems like the example shown in the video would make a lot more sense as a simple then(...) chain. I doubt that having a super detailed understanding of generators is super helpful in the modern scene
@vietanhvu8155
@vietanhvu8155 6 жыл бұрын
Why you don't talk about Promise in ES6
@shermirsaliev5227
@shermirsaliev5227 7 жыл бұрын
i didn't get the part that js is right to left, how is that?
@artihlec
@artihlec 7 жыл бұрын
Yep, JS runs from RIGHT to Left.
@supremoluminary
@supremoluminary 4 жыл бұрын
JavaScript does not run from right to left.
@Driver0077
@Driver0077 6 жыл бұрын
window.onload = function(){ function* gen(){ var x = yield "pear" var y = yield "banana"; var z = yield "apple"; return x + y + z; } var mygen = gen(); console.log(mygen.next()); console.log(mygen.next(10)); console.log(mygen.next(5)); console.log(mygen.next(3)); }
@alexisdvt
@alexisdvt 8 жыл бұрын
BTW you don't need to use the return keywords
@les2997
@les2997 6 жыл бұрын
Right, both return handle() are not needed, just call handle()
Урок 11. JavaScript. Генераторы. Symbol iterator, for of
17:26
Владилен Минин
Рет қаралды 109 М.
JavaScript ES6 Tutorial #9 - Arrow Functions
8:01
Net Ninja
Рет қаралды 32 М.
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 11 МЛН
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 11 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
He bought this so I can drive too🥹😭 #tiktok #elsarca
00:22
Elsa Arca
Рет қаралды 11 МЛН
Prompt Engineering Mastery Workshop (for Attorneys) Module 1/4
2:20
not strictly necessary
Рет қаралды 10
Generators in JavaScript
22:16
Fun Fun Function
Рет қаралды 48 М.
Asynchronous JavaScript #2 - AJAX Requests
13:20
Net Ninja
Рет қаралды 137 М.
The Power of JS Generators by Anjana Vakil
36:10
JSConf
Рет қаралды 164 М.
JavaScript ES6 Tutorial #5 - The Spread Operator
4:49
Net Ninja
Рет қаралды 42 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,5 МЛН
An Encounter with JavaScript Objects
10:38
Fireship
Рет қаралды 145 М.
JavaScript ES6 Tutorial #7 - New String Methods
6:50
Net Ninja
Рет қаралды 26 М.
Asynchronous JavaScript #4 - Promises
13:03
Net Ninja
Рет қаралды 85 М.
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 11 МЛН