The await is over! Learn how to make your JavaScript Promise code beautiful and concise with async-await github.com/codediodeio/async-... Jake Archibald's Talk: • Jake Archibald on the ... Demos with Angular: / @digitalfluency
КОМЕНТАРІ: 1 000
@kiwihour3332 роки тому
Glad he returned the promise that we've long awaited
@notsojharedtroll23Рік тому
😷😷😷
@DaddyjsРік тому
LOL no pun right ?
@santi100aРік тому
But the Actions job failed because he took more than six hours.
@nyx285911 місяців тому
Finally fulfilled
@Anon1629011 місяців тому
then...
@garywaddell63095 років тому
You’re the only guy that I slow the speed down instead of skipping or speeding it up 🙂. Love the emoticons in the code, how do you do that?
@Fireship5 років тому
Thanks Gary. They are supported natively on most systems now so you can copy them from Emojipedia, or use them on the web with a utf8 meta tag.
@__mayank5 років тому
You can also use the Windows key + dot/period shortcut anywhere in Windows
@davidn70265 років тому
oh sweet thank you Mayank
@LukePighetti5 років тому
On macOS control+command+space pulls up the Emoji keyboard
@djadjana5 років тому
ahah i was just going for the speed option when i saw your comment on the top of the comment list XD
@skylible5 років тому
"When you're start making promises that's when you're more likely to screw things up" That's also how it works in real life. Noted.
@cyan20482 роки тому
I've always thought JavaScript could never actually be a good analogy for everyday life.
@MzulfreakyРік тому
Yepp
@neux64Рік тому
I knew someone would quote this before I looked through these comments.
@nullbeyondo9 місяців тому
I just made a promise to a friend of attending a surprise birthday tomorrow and I probably screwed it up because I also promised my family to go out on a trip the same day which I haven't resolved yet ugh.
@kld00935 років тому
You Promised, and we awaited. ...Sorry for bad joke
@Fireship5 років тому
It's ok, async-await is the best place for bad jokes :)
@resetcoder5 років тому
I sync it wasn't that bad.
@jingchuanzhu10734 роки тому
yeah! all async-ed
@sindydanelygarciahernandez4 роки тому
😂😂😂
@jelordgulle90224 роки тому
Deserves a medal
@thehumanslayer555 років тому
You deserve so many more views, favorite channel about development on youtube
@busyrand4 роки тому
Promise Statements and Async Await are the favorite things I've recently learned about in JavaScript. This lecture was/is right at the borders of what I understand, and was challenging in a good way. I appreciate the visuals. I really appreciate the additional lecture resources you mentioned. I will study them and loop back to this periodically until I'm clear on what was presented.
@taltalonixРік тому
I was debugging something for an hour and decided it's finally time to fully understand the async / await functionality, turns out the concurrent map execution was the issue lol. Thank you for the quality content (from 4 years ago), you are helping me a lot and everyone else in the community.
@loddulf5 років тому
Being new as a developer with just over a year coding and picking up JS as my main language a couple of months back, this video explains so many of the issues I have encountered coming from a synchronous language (Java and Python) to async in JS and TS. This channel does a great job of explaining essential concepts to newcomers like me. I'm glad I found the channel. Thanks!
@EelFeEr5 років тому
It blown my mind. I need to study a lot yet. Great video, thanks!
@jesselima_dev2 роки тому
This video is from Oct 11, 2018. It is still one of the best explanation I have ever seen. It is just so clear. And that recommended video about the NodeJS event loop is a must-watch for JavaScript developers. I am an Android Developer and I saw that video. So if you are JS Dev and you did not, you might be a bit late. No worries there is still time. :P
@davieskwarteng5 років тому
I have learned so much in a short period from your channel ... you deserve tons of credit
@zigmasslusnys35965 років тому
Found your video of right good code not 💩 in my feed, loved you style of explanation and the way you provide the video editing is exceptional 🤩 one of the channels I'll definitely share and follow!
@aerivera5 років тому
My mind just was blown away, amazing tutorial, as always.
@Jopie654 роки тому
It's good that you explain the background of async/await! I consider those keywords both a blessing and a curse. In my experience, people new to JavaScript use it without knowing what's going on in the background. This often leads to bad results which they don't know how to resolve. When you know how promises work, you can actually appreciate what async/await is abstracting away for you.
@robertzeurunkl84012 роки тому
When I started working with Promises, it took me a while to realise that the _.then()_ was pretty much the same problem as the callback. And the big problem for me was that outside the "then()", I had no way of knowing WHEN the then has resolved, or even if it had at all. "Await" is much better.
@hambrsoombaboyan20784 роки тому
This was one of the videos that I didn't want to skip any second!! GREAT JOB ! Much Appreciated!
@arisgrey87725 років тому
The best video I've watched so far for await / async. I covers all the aspect in such small duration. Loved the emoji too :D
@shop.autocrew25705 років тому
Typo at 8:00, screen on the right, line number 67, it should be a=v. Great tutorial! 😀
@Fireship5 років тому
You're right, good eyes :)
@orcsword5 років тому
Oh, thank you man, I thought that is something wrong witm me, when I was trying to understand why is there are a=v
@karinchechik26615 років тому
@@Fireship You should add this as a comment or something for future viewers.. and thanks for the great tutorial! :)
@oksanaserhiivna26345 років тому
Yep, I also went to check in the comments whether smth had been already mentioned on that point, so that just not to blurt out anything silly. :) Still I really love to re-watch these tutorials now and then!
@firstprincipleslearning4 роки тому
I was about to write the same comment. Good catch !
@dakedres4 роки тому
Holy shit! I had no idea about the for await... loop! That's amazing, thank you!
@Dan-codes2 роки тому
This was very helpful. I like how rapidly you gave instruction, yet made it very clear.
@tomlemanh55065 років тому
LOVE this... You've helped me so much understanding this concept.
@connormcgill47985 років тому
I love this channel and maintain a pro subscription over on their site and have found it to be more than worth the price of subscription, free access to current and upcoming courses is amazing and I love how a lot of the pro videos are a direct and more in-depth look at an earlier free video with an emphasis on real world use case scenarios. This video is excellent and really helped me to further understand how and more importantly when and when not to use async await in my code. Thanks again man and keep producing incredible content!
@Fireship5 років тому
Thank you Connor! Happy to hear the feedback. How NOT to use async/await is probably the most important part :)
@tobiasrasmussen43472 роки тому
Hats off to you, you legend. It's mad that you can symmarize all of these concepts into just 12 minutes while making more sense then all the other videos out there that take 3-4 times longer.
@rahulsawant55315 років тому
Your way of explaining things is just amazing! Thanks 😊👍
@markemerson983 роки тому
bravo - the best 12 minute clear and simple explanation of promise, async/await I have seen to date...
@elbys_pocket5 років тому
It’s insane how quickly JS is developing new features. So excited to see what happens next or if we can get an ES based typing system. Thanks for the vid!
@alanschwarzlopez5 років тому
Man you definitely deserve much of the credit for the success of my future StartUp^^ Please don't stop, your videos are making the world a better place, thank you
@Fireship5 років тому
Great to hear that! Buy me a beer when your valuation reaches 1Billion.
@TT-pu1lw3 роки тому
I ll feel so grateful finding your channel. As soon as I start making money , gonna buy those awesome courses
@greenie26002 роки тому
The clearest explanation of async/await that I've encountered. Well done!
@theprince088534 роки тому
I'm a backend dev and I just wanted to say this was a brilliant to-the-point video. I had to watch it twice but very invaluable. Subbed.
@MartinLP1234 роки тому
Great video! But I wondered if there might be a mistake around 8:00 on the right side. Shouldn't it be 'a = v' instead of 'v = a' if the code should be doing the same? Thanks.
@rancoxu3 місяці тому
correct, i tested it. his code returned undefined as a is undefined and v=a which makes v undefined as well.
@okolin5 років тому
Great content! I love quality and how well thought all of your videos!
@Sam-hj5ok2 роки тому
You just showed me how much more ground I need to cover in JavaScript. Gets me excited to see I'm not even 10% done. Keep it up 👍🏿
@kazpeh5 років тому
This video cleared a lot of things up for me, thank you!
@hicoopРік тому
Incredible video. I avoided async and await because I didn't know what I was doing but now I think I get it
@daddydo17355 років тому
Another great tutorial from Mr. Delaney! Bravo!
@gautammishra34365 років тому
Nice explanation , learned a lot about async and await. Thanks for you frequent videos on practical topics .
@ChadHollman5 років тому
Great video! Great explanation, great quality, hoping for that free shirt!!
@Fireship5 років тому
WINNER 🎉 - Congrats, you won the T-shirt. Message me with your mailing address and size :)
@brunobarretocarvalho23155 років тому
no jokes? i feel REJECTed didn't know about the for loop stuff, cool! about the try/catch: should i wrap all the awaits in one or use a separate try/catch for each await to treat better different errors? great video as always!
@brunobarretocarvalho23155 років тому
i feel stupid. i didn't get the initial a sink a weight joke. good one
@Fireship5 років тому
That's a great question and almost included a section, but vid was getting long. I would say only 1 try/catch per function, but you might want to chain a catch call back to individual promises for fine grained error handling as needed.
@utkarshsaxena78263 роки тому
i swear to god for every two minutes i spent watching this video, i had to pause and go read about 2 hours worth of material. Totally worth it tho, i love this fast paced style of teaching.
@shankarupadhyay60675 років тому
Great explanation, specially when you started it from event loop. Loved the video as well as "Fire.......base...". Thanks
@vakyz53334 роки тому
New subscriber here. the content quality of video are Amazing. i need this in my api thanks
@Afreshio3 роки тому
Ok newbie on JS and programming here. Didn't understand most of it, but is fun watching intermediate/advanced content like this and wonder if in my future I'll be able to comprehend and do all of this by myself.
@devontebroncas49678 місяців тому
updates??
@daniellaerachannel5 років тому
the Jake Archibald talk is fantastic! your tutorial too! thanks
@heitormbonfim2 роки тому
So far the BEST EXPLANATION I've seen of it with practical usage and short
@feschber5 років тому
I'm just gonna let this video _sync_ in now
@UCFc1XDsWoHaZmXom2KVxvuAРік тому
This is top tier stuff. I've been watching Fireship for like 2 years, but it's only now that I'm finding myself forced to actually learn webdev for good. These old videos are still incredibly sharp, I'm really impressed.
@mohammedibrahimali29885 років тому
Each an individual day is a learning from you guys, you guys deserved much better. Await for the T-Shirt
@tHekrack235 років тому
Concise, fast a great explanation. Kudos to you sir
@PaurakhSharma5 років тому
I await for your next video :)
@TwstedTV5 років тому
after studying and learning javascript, getting certificates from 4 different online completed courses, I watch this video, get depressed and rip up all my certificates and start all over again. so depressing :( because i now feel like I didnt learn shit from those courses and have to start all over again from scratch. ooh well, back to html and css and eventually javascript yet again :(
@AP-rs5wz3 роки тому
Can't be that bad !
@TheStrategistYT2 роки тому
Before I watched a lot of your videos I was in the first part of the Dunning-Kruger effect, but after watching a ton of your videos I now realize how much I don't yet know.
@jackwalker26392 роки тому
Discovered your channel very late. Thanks for such a clear explanation.
@AngelHdzMultimedia3 роки тому
"The Async Await Episode I Promised" ...and that's how you make a video title.
@kevinxin15453 роки тому
I did not get it the first time I watched this episode, but now I know a bit more about javascript and when I came back for a review I laughed so hard XD
@agusmelo12 роки тому
Got one question that's been bugging me and I can't wrap my head around it. The code on the right - line 67, shouldn't it be inverted? meaning a = v? Because otherwise you would be assigning *v* to an undefined value, and what you should be aiming for is to store the value you have in *v* into *a*, that's the propose of *a*, right? (Pleas someone tell me what I'm missing, thank you)
@hamidmohammad21572 роки тому
Agreed!
@FozIrenics2 роки тому
same question here
@sidkapoor9085Рік тому
You are correct, it should be the other way around.
@blokche_dev5 років тому
Instructive, as usual! Thank you for clarifying some things about the promises.
@Fireship5 років тому
That's what I'm here for, thanks for watching :)
@xTiQ4 роки тому
Always like your video's, really educational. But I always have to watch on 0.75x speed else it goes to fast to understand.
@SahilRajput034 роки тому
I usually watch at 2.0 x, you it hardly is a choice of interest. It is not proportional to learning rate though. ;D
@indrasusila97495 років тому
and i set the speed setting to 0.75 for this
@Glavin8833 роки тому
Your quality of videos is absolutely incredible Sir.
@dk-gl5 років тому
This video is the best Async/Await video on UKposts! Keep it up!
@dangerous_tangerine11 місяців тому
I think you broke my brain.
@debunkitnow4 роки тому
Holy sh*t i need to let this "sync" in so that i can "await" for better time to "express" myself and "promise" to come back....
@splch3 роки тому
im still awaiting your response
@camperjett2 роки тому
I am binging your channel. It's been 2 weeks and am already loving web dev 😀
@pl577811 місяців тому
Top tier stuff. I didn't fully understand the looping concurrently / await individually until now.
@powerofpizzazz4 роки тому
i thought it was a 12 min video but i have to watch a 35 min video :(
@najimali323 роки тому
Exactly😂
@tomihawk015 років тому
Async/Await is a double-edged sword. It's a great addition to Javascript but it's also massively misused. I'm trying not to sound "elitist" here, but the complexity of promises and RxJS set a barrier for entry. People needed to understand how to write reactive code, work with asynchronous functions, etc. Now Async/Await has become the hammer for every timing bug that looks like a nail. I've seen the async and await keywords peppered through code in the hope it will magically fix a timing issue, mountains of code needlessly synchronised to the point it's stuttering to a halt on every page load. Hopefully people will take your "trolling" on board and gain an understanding of how it works. Really happy to see the pitfalls covered as well as the benefits.
@Fireship5 років тому
I agree with you 100%, that's actually why highlighted some of the misuse and started with the event loop. Overall though, its had an overwhelmingly positive impact on the projects I've been involved with.
@LukePighetti5 років тому
Seems pretty simple to me. Batch non-dependent promises with promise.all(), await promises, don't await synchronous code. Surely the benefits of async/await far outweigh the people using it wrong.
@litbro81802 роки тому
This video has helped super-refine my understanding of asynchronous programming in general
@mlotov38382 роки тому
I admire how you explain why async await even exists in the first place and that you should use it in a certain way to achieve maximum efficiency. Keep it up ur the best, OG subscriber :)
@JamieMcI5 років тому
Don't leave a comment! It ruins my chances for a free T-shirt! (Great video!)
@algeriennesaffaires70175 років тому
So fast u made it so complicated you get me lost more than i was hhhh
@shannonhall48715 років тому
Nice, thanks so much. Jake Archibald really made it clear for me whats going on. Your stuff is always great and i always get something from it even if i think i know already.
@Fireship5 років тому
Thanks! Jake's talk is one of my favorite of all time.
@zimcoder5 років тому
This has been madly helpful. I wish I knew this 2 years ago!
@ImperiumLibertas5 років тому
watchVideo() .then(comment()) .then(winTshirt());
@ColinRichardson5 років тому
You do know you are calling and running comment and winTshirt immediately, not waiting for the video to finish? I presume you meant to reference the comment function, not run it?
*then* takes a function reference. So unless your comment and winTshirt methods return a function, they would get executed immediately watchVideo() .then(comment) .then(winTshirt); or if you Don't want to use response from previous promise watchVideo() .then(videoWatched => comment()) .then(commented => winTshirt())
@abdullahalkurdi68455 років тому
I liked it but it was too fast to digest. Could you please consider making videos less faster. Truly appreciate the value of the info. Thank you
@m_usertim27555 років тому
use vlc, it supports UKposts links natively. You can slow down video however you want.
@troythompson25 років тому
Never disappointed with your videos Jeff!
@TheDeepanj5 років тому
You share best tech knowledge that too wrapped in smallest amount of time... Kudos... Loving ur stuff 😊
@denniszenanywhere4 роки тому
Serious question. Does anyone really like this speed? He is certainly very knowledgeable but I doubt if anyone can really understand him.
@avivshvitzky24594 роки тому
I agree, I usually speed-up videos, but this one as actually too fast for me
@beratsulimani98235 років тому
async winnerTShirt() { await('ME'); }
@jafar16075 років тому
Wow. Such a lovely explanation. Great work
@abdulhakimbashir62685 років тому
Always learn new stuff when I come here. Good content
@AnkurGandhi84895 років тому
The explanation is not very succinct. You could have explained a bit slower
@zurikzava99715 років тому
I have no idea what he's talking about, I had to stop at 3 minutes
@qazyhn945 років тому
I watched video like 3 times, and its easier to rewatch it when he speaks fast
@julesl20875 років тому
I personally love the speed of the explanation. If I don't understand I just pause the video or rewind a bit.
@aeriox99165 років тому
I think It’s better as it is - simply as mentioned above - It’s more efficient to rewatch the whole video or a part of it for the sake of understanding rather than get a long one with slow explanation that usually tends to make the viewer get bored and lose focus
@hughpapaheffner49574 роки тому
This is an advanced topic, not for beginners. This is the right speed if you know what he is talking about.
@AdrianGordon12314 роки тому
Whoa whoa, slow down a little man. Great content but you are going way too fast. I know it definitely takes more effort and may not be worth it, but if you type out the code instead of coping and pasting the slowed pacing will make it much easier for your audience to grasp the concepts.
@Cromzinc4 роки тому
I agree, I had to put him on .75 playback.
@vnrbhat4 роки тому
I had same thought, I had to rewind many time to understand "billion loop".
@okie90254 роки тому
this isnt a tutorial
@jerryjeremy40384 роки тому
Really indeed very cool!!! Feels like an hour of tutorial. Thanks
@DEV_XO5 років тому
Amazing channel mate, nice emojis, nice content, everything just nice
@wabisabi77274 роки тому
you talk so fast. i cant watch whole things clearly
@HarshithJV4 роки тому
yup. way too fast. I slowed down to -0.75 speed. 😂
@vladimirzizic68743 роки тому
Great job, however, this was very fast. It`s so much info in 12 minutes. I was pausing and rewinding hundreds of times.
@ErikKubica5 років тому
Great video, very well explained like all your videos. I wish I saw this about 2 years earlier. Interesting would be how to cancel a promise, let´s say that user opens a page that starts an request, but he quickly navigates away, this request is still ongoing and after the request is finished it callbacks a code in a component that is no longer on screen (happened to me few times when working with react and redux then I got console errors), I know that this is not natively supported but there must be a way to achieve this and there are lot of discussions about different ways.
@micahgoodreau5 років тому
awesome job. love your vids, keep the coming!
@glatocha3 роки тому
that's way too fast. I got discourage after 2 minutes
@vinisantos.2 роки тому
What a video, brother! I've read about it and watched quite a few videos with examples and it was still not clear. They all show you a promise converted to Async/Await...all of them failed to provide the context with the event loop in the manner you did. Best explanation hands down. Thanks for the great content. I just subscribed. P.s.: Yes...3 years after the last comment... :)
@panconcianuro4 роки тому
Thank you so much. Your tutorials are great 🥳. Greetings from Chile
@bhuvanesharasu4 роки тому
Wow! Just wow. Have no words to explain. You were really clear..... Thanks a lot.
@gam1l5 років тому
Very informative and well explained, thank you bro
@sagar_pawar273 роки тому
I had spent lot of hours to read so many articles about async await & promises but this guy clear my concept in just 10min
@nyghtseven5 років тому
Thanks alot, I was struggling with Ajax call , this is exactly what I needed. I found your channel with your video on good js code , and damn I thought I knew a lot about js but finally not :D , thank you sir !
@DelgadoRecords5 років тому
Awesome content, i'll check the Jake's Talk and the Demos with Angular. Btw, that font looks awesome! what is the name of it?
@jangajdosik63945 років тому
Not sure if the smoothie was so sweet or async/await :) Great video as always!
@Freedestroyer5 років тому
Lovely info! Well done and thanks for the good content!
@xpkareemРік тому
Oh my god thank you! I will be watching this video every single time I need to write asynchronous javascript for the foreseeable future. I have been making a couple of these mistakes you pointed out. This video deserves 20 billion views.