I've gone thorough 20-30 videos on async await in the last few days as I am trying to learn JavaScript and Node.js - and hands down this is the best that I've seen for a beginner to learn the concept and build upon it.
@christianonyango74604 жыл бұрын
the reason i like Traversy Media is because you actually start with him like you write all the functions together you create files together, these ones with pre-existing code is not as fun, but its a cool video anyways, thanks
@seanraz4 жыл бұрын
This really helped me get my head around the differences between the different async JS approaches. Thanks!
@christianma81605 жыл бұрын
Excellent video! Very well prepared and demonstrated. The little hint about async/await not working with functions using a callback themselves was awesome. That was my main point, why I still struggled. Thanks a lot!
@madhulathachowdary73434 жыл бұрын
Hey CodeWorkr . Amazing video. a new subscriber to your channel . Also your accent is not bad . In fact it is very good to understand and the examples you provide is very simple and clean . please do keep it up . Expecting more videos from you on tricky concepts. 👏👏👏
@paulocabelloacha41955 жыл бұрын
Just now that I'm learning Javascript. Thanks a lot guys!
@PriyankRupareliya4 жыл бұрын
Very finely explained - Helped me clearly understand the fundamentals
@HostDotPromo5 жыл бұрын
Async is amazing, thanks for the wonderful breakdown!
@CodeWorkr5 жыл бұрын
Thanks for watching! 🙂 Async really is amazing, best thing that has happened to Node.js (well Promises first and foremost, but then Async/Await as it's a wrapper more or less).
@annabudonna35663 жыл бұрын
Great explanation, thanks!
@akashgvalani42134 жыл бұрын
Great Job!! Can you explain if Data is an array why is it declared as an Const Variable (referencing timer 26:02 seconds)?
@havefun55192 ай бұрын
inner async with try/catch, Okay, new view for me, usually, I just use one try/catch block for using the Promise fn().
@la61885 жыл бұрын
you're such a legend. thanks for this video!
@diqian92395 жыл бұрын
Really awesome tutorial! Thx
@ZippoGee5 жыл бұрын
Thanks, CodeWorkr. I learned a lot. What editor are you using?
@SSantiago905 жыл бұрын
Larry Gutman It's Microsoft Visual Studio Code
@hulk63153 жыл бұрын
@@SSantiago90 lololololololololololololololololol
@muhammadnadeembashir79405 жыл бұрын
Please make a tutorial on recursion in javascript with many examples and explanation please thanks ..
@MrRicharddaniel5 жыл бұрын
Hi please do a course on redux. Love the long crash courses. They are great
@abdulhadilababidi80525 жыл бұрын
Big Like before watch Great channel ==> awesome videos Keep going guys!
@simoneicardi39674 жыл бұрын
nice one!!
@saisreenivas22275 жыл бұрын
Thank you
@77Sazaca5 жыл бұрын
Nice!
@nikhiljoshi61553 жыл бұрын
How can we start all powerplant in parallel?
@zaydenrosario50475 жыл бұрын
38:57 Try adding async before powerPlant, so it will be like this powerPlants.forEach(async powerPlant => {
@szyszak5 жыл бұрын
Just a little note, you didn't declare variables in for-of loops, which is a bad practice.
@pupfriend5 жыл бұрын
Generators make my head hurt
@yanpelov5 жыл бұрын
the only useful thing in the video is the promise all function, that actually shows performance benefit. what's the point of using async/await sequencially? take note that it can even degrade performace running sequencially because of the extra overhead.
@CodeWorkr5 жыл бұрын
Hey Yan! There are situations where you need to do 2 "slow" operations in sequence, where the latter operation depends on the data returned by the former operation. In that situation you'd actually use async/await in sequence and won't use Promise.all(). An example: // Get some data from the DB const data = await grabDataFromDB({ id: 'something' }) // Process said data const processedData = await processData(data) You can't really use Promise.all() here as second line depends on the results of first line.
@yanpelov5 жыл бұрын
@@CodeWorkr In the examples you provide in your reply and video there is no preference to async/await over sync ops. the whole purpose of async ops is that you can keep running in the background with other stuff or in parallel. if you don't do that, than there is no point using async await in the first place.
@CodeWorkr5 жыл бұрын
@@yanpelov Oh, understand what you mean now - yes, we agree on that, await-ing multiple things in sequence is making the entire flow sequential and there aren't advantages (as when using promise.all). Still, you might be using async/await throughout your project and for example a single function might make a use of both promise.all() (where applicable) and then awaiting operations in sequence where absolutely necessary, so you're still saving time/performance when you can (on promise.all() part) and then doing few things sequentially when you can't get away of doing so. // Some time will be saved because we're not sequentially calling all of them const data = await Promise.all([getData01(), getData02(), getData03()]) // (In between) Some time will be lost because of waiting on upper promise // Some time will be saved because we're not sequentially calling all of them const results = await Promise.all([processData(data[0]), processData(data[1]), processData(data[2])]) That'd be a combination of both "patterns" for example. Of course correct me if you think I'm wrong
@yanpelov5 жыл бұрын
@@CodeWorkr btw, consider the following real life example to demonstrate the usefulness of asynchrony in life (pseudo code) : async lifeExample() { prepareSoup() ready = await putSoupOnStove() //takes about 30 minutes to cook do { runOnTreadMillFor10Min() //do workout while soup is cookin' } while (!ready) //open pot lid and check if soup is ready eatSoup() //eat the soup now that it's ready shower() //after you worked out for ~30 mins and ate soup. watchNetflix() //enjoy your evening }
@harisbashir60745 жыл бұрын
Heart
@TottiBln5 жыл бұрын
I love You! ;)
@sonugupta4105 жыл бұрын
nice...
@DivineZeal5 жыл бұрын
import asyncio oops wrong video, cya!
@stumpymartin60745 жыл бұрын
Divine Zeal goo.gl/iL7Apr Latin numerals - Wikipedia
@stumpymartin60745 жыл бұрын
📽👽😇tytnuhuuhht GJ van and trailer
@motomono5 жыл бұрын
Thanks mate for great explanation. But please please please improve your English pronunciation - it's painful to listen.
@CodeWorkr5 жыл бұрын
You're welcome Kornel! My pleasure! I'm trying, this was one of my older videos, hopefully I'm getting better!
@szumeczek5 жыл бұрын
No, it's not painful to listen. It's actually pretty good. Here in New York he would be one of the easier persons to understand :)
@ViniciusRocha-bl1lk5 жыл бұрын
@@CodeWorkr I'm brazilian and I can understand you perfectly.