JavaScript Async Await

Поделиться
HTML-код
  • Опубликовано: 8 фев 2019
  • One of the hardest things about writing good JavaScript is dealing with heavily nested asynchronous code. Promises were created to solve the problem with callback hell, but there are still plenty of nested problems related to promises. This is where async/await comes in. JavaScript added async/await to allows developers to write asynchronous code in a way that looks and feels synchronous. This helps to remove many of the problems with nesting that promises have, and as a bonus can make asynchronous code much easier to read and write. In this video I am going to explain what async/await is and how to use async/await to rewrite your existing promise based code.
    Learn Promises First:
    • JavaScript Promises In...
    Async/Await Article:
    blog.webdevsimplified.com/202...
    Twitter:
    / devsimplified
    GitHub:
    github.com/WebDevSimplified
    CodePen:
    codepen.io/WebDevSimplified
    #JavaScript #AsyncAwait #Promises

Комментарии • 766

  • @muhammadsafiullah8428
    @muhammadsafiullah8428 4 года назад +833

    I showed this video to my crush and she's my wife now. I'm grateful, thanks for sharing this video with us.

    • @WebDevSimplified
      @WebDevSimplified  4 года назад +549

      I didn't realize I had so much power within my videos. I need to show this to my girlfriend :P.

    • @the-mush
      @the-mush 4 года назад +92

      @@WebDevSimplified aaaaand, now she's pregnant (o_O)

    • @mhshoghi
      @mhshoghi 4 года назад +12

      @@WebDevSimplified Perfect . :))

    • @the-mush
      @the-mush 4 года назад +4

      @@pearlsswine it is black and has ginger curly hair, what does this mean? D:

    • @kofuku1344
      @kofuku1344 4 года назад +121

      Did the same, now I'm single

  • @rebelmachine88
    @rebelmachine88 5 лет назад +625

    This is definitely one of the best, simplest explanations I've seen of async/await. Thank you!

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +27

      Thanks! I am really glad you enjoyed it.

    • @vinubox
      @vinubox 4 года назад

      Sure !

    • @mr.prince8701
      @mr.prince8701 4 года назад +1

      @@vinubox It really is. It's short but effective.

    • @latinstuff1
      @latinstuff1 2 года назад +7

      thats what everybody says in every tutorial in youtube lol I trust you and im sure this is an epic and amazing explanation but its funny to see the same comment in every tutorial.

    • @rebelmachine88
      @rebelmachine88 2 года назад +2

      @@latinstuff1 lol you're not wrong about that! Ppl tend to absorb information differently, so it makes sense it would be a common comment on tricky subjects.

  • @maximofernandez196
    @maximofernandez196 Год назад +12

    Man, I cannot tell how good you explain. The best part is that you explain the WHY of the things that happen. Really, amazing work

  • @franciscopena1140
    @franciscopena1140 Год назад +13

    I like how you go straight to the point. Thanks

  • @evanoshea9506
    @evanoshea9506 Год назад +23

    I've been watching all your videos. Nobody else on youtube has coding videos so succinct and efficient to watch. Thank you for valuing the time of your viewers!

  • @woehrle17
    @woehrle17 2 года назад +9

    I'm in a web dev bootcamp currently and you're videos are amazingly helpful, thanks so much.

  • @jonayedmohiuddin538
    @jonayedmohiuddin538 5 месяцев назад +1

    this is what i was looking for simple elegant explanation.

  • @OfChaoticReign
    @OfChaoticReign 4 года назад +16

    People like you are why I love the JavaScript community. I still hate the language, but I love this community. Thanks for posting this!

    • @gabrielaperez42
      @gabrielaperez42 3 года назад +2

      hahahaha this comment represents me a lot!

  • @TheMr0450
    @TheMr0450 4 года назад +9

    Dude.. async/await and promises had scared me for years.. uve made me understand them in 17 mins.. much much appreciated...

  • @prathameshyadav2001
    @prathameshyadav2001 2 года назад +57

    I don't comment usually but this video is on another level. Spent hell lot of time understanding promises and async-await and after watching this video I am feeling like how foolish I was not to understand this simple concept 😂

  • @pastorfred2543
    @pastorfred2543 4 года назад +62

    Thanks Sir, I appreciate the way you've made it look it simple. Now my fears are gone.. I will use Promise and Async Await in my projects.

  • @rachelf5466
    @rachelf5466 2 года назад +2

    This guy about to single-handedly help me pass my web programming class. Super easy to understand

  • @codewithbishal895
    @codewithbishal895 3 года назад +9

    web dev Simplified and dev Ed this 2 guys literally taught me everything

  • @ranellabjata5170
    @ranellabjata5170 2 года назад +3

    From callbacks to promises and then to async and await. Beginners like me often confused with this three. Thanks for making this three more clear. 👏

  • @IfadArdinx
    @IfadArdinx 4 года назад +13

    I watch your video everytime i'm about to start a section in Codecademy. You give the simple explaination of the concept while the Codecaemy provide the practice. Such a great combo! Thank you!

    • @brandoncbh
      @brandoncbh Год назад

      How long after starting to learn did it take you to get your first job?

    • @natasdabsi1138
      @natasdabsi1138 3 месяца назад

      @@brandoncbh 1 year

  • @dougiehawes916
    @dougiehawes916 4 года назад +2

    this is something I have struggled with for ages and just followed what I was told on tutorials without knowing what I was properly doing. I had a vain hope that one day it will fall into place. This video is what I needed.

  • @christianmaoro5900
    @christianmaoro5900 2 года назад

    Excellent job! A good example to explain all we need to know about it in a few minutes. No gimmicks, no blabla. Please keep going!

  • @jeffricks4023
    @jeffricks4023 2 года назад

    I've watched a few of your videos as I've come across them over the last few weeks. You consistently do a very good job of explaining things. Thanks!

  • @snowplow8418
    @snowplow8418 Год назад +13

    You take a concept, boil it down into its essence and explain it using the most basic and easy to understand example. Incredible videos. By far the best channel on YT for this.

    • @williamdevonshire356
      @williamdevonshire356 Год назад +2

      i know right? the other ones end up confusing me with all sorts of seemingly unrelated and complex additions, whereas his vids just say what need to be said and are understandable without and unnecessary and difficult additions

  • @justmeldin6062
    @justmeldin6062 5 лет назад +86

    Even thou you speak fast, somehow I can completely grasp the topic. The name of the channel is right on point. Keep it up : )

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +8

      I'm really glad you were able to understand the topic.

    • @keremardicli4013
      @keremardicli4013 2 года назад +1

      Fireship and wds channels are meant to be watched on 0.75x playback speed.

  • @dondxniel
    @dondxniel 3 года назад

    I've watched videos on this concept and read several articles on it, none explains it as simply as this video. Thank you, and keep up the good work!

  • @groovermctoober4508
    @groovermctoober4508 Год назад

    Nearly everyone here on RUclips who tries to explain Javascript promises, async, etc. blabbers on and on, boring the viewer, but you don't waste the viewer's time. You come right to the point and clearly and understandably explain these things without any superfluous nonsense. Bravo! Keep it up.

  • @ashharthegreat
    @ashharthegreat 4 года назад +3

    I just started to watch your videos, you explain very simply in a short amount of time.

  • @user-kn5yr2vu7k
    @user-kn5yr2vu7k 4 года назад +6

    Thank you, by far the best and easiest to understand explanation i've found. I also watched your video on promises, very well explained!

  • @adityaghosh6170
    @adityaghosh6170 5 месяцев назад

    Definitely the best video on the youtube regarding async await. One request, please never stop making these type of videos.

  • @stromblessed
    @stromblessed 5 лет назад +47

    Great video, Simple and easy to understand tutorial. Thanks man.

  • @henrycabral6012
    @henrycabral6012 3 года назад +1

    Your explanations on promises and async await were very well done. This helped a ton! Thank you!

  • @monfernape
    @monfernape 5 лет назад +145

    Hey how did you make it so simple? Thanks

    • @vinubox
      @vinubox 4 года назад

      Exactly!

  • @techstuff7568
    @techstuff7568 2 года назад +33

    I was avoiding async/await for so long because I thought it was complicated and I was doing fine without it. Finally looked into it and wow it's simple and clean. Thanks for the great tutorial!

  • @todordonev
    @todordonev 3 года назад +7

    I dont usually write comments in youtube but.. damn..
    By chaining your videos one after another explaining different concepts I now understand all this javascript spaghetti. Also your videos are very high quality and you are a very good explainer.

  • @roymargalit2660
    @roymargalit2660 3 года назад

    this is mind boggling. i am overwhelmed by how much easier this is.
    thanks man!!

  • @asthayadav4931
    @asthayadav4931 4 года назад +1

    Went through 2-3 different videos but the way you explained async await (and promises in a diff video ) is way too good. Thanks!

  • @nowleaks8643
    @nowleaks8643 3 года назад

    Finally, the only explaination that i understood after watching at least 10 videos on async.

  • @mustaneerhaider515
    @mustaneerhaider515 3 года назад +1

    Dude you explained Asnyc/Await and Promises both in such an easy and simple way.

  • @bjornarmar2462
    @bjornarmar2462 4 года назад +1

    Came here with a knot in my brain for an additional perspective after finishing Brad Traversy's JS course on Udemy.
    All the gears have finally clicked into place.
    Subbed!

  • @29rohitkumar01
    @29rohitkumar01 3 года назад

    One of the best explanation for async await on RUclips.

  • @MonsterFishKeepersPH
    @MonsterFishKeepersPH Год назад

    man I love how you explain things so clearly

  • @krisashehi5144
    @krisashehi5144 2 года назад

    Ive been struggling to grasp async and await for a couple of days. This video made it so easy, thank you!

  • @MrTubs987
    @MrTubs987 5 лет назад +1

    Finally a clear, concise, and well produced example. Thank you!

  • @iraqplayer7270
    @iraqplayer7270 4 года назад +3

    Perfection! Simple, easy and straight to the point! My God bless you sir!

  • @amitdev652
    @amitdev652 2 года назад

    u are one of the few people who actually know the stuff right, never bs sm1 and are good at explaining

  • @berakoc8556
    @berakoc8556 4 года назад

    The most clear explanation of Async Await concept. Thanks so much!

  • @rocraz01
    @rocraz01 4 года назад

    Nice and simple explanation. Thanks for taking the time to produce this (and the other) videos. Congrats!

  • @xiaweiliang5168
    @xiaweiliang5168 3 года назад

    Thank you so much for letting me be clear about how to use the async and await, very straightforward and clear!!!

  • @codeAlongwith
    @codeAlongwith Год назад

    Your channel is one of the most useful js channels I have found. Thanks.

  • @mabrodoublec8225
    @mabrodoublec8225 2 года назад +1

    This video ranks among the best, on async and await. I recommend it to anyone wanting to learn the concept of async and await.

  • @dongwei9907
    @dongwei9907 5 лет назад +2

    I really like the teaching way that transforming from the promise to the async-await format, which is really intuitive and makes a connection between different knowledge. Thanks so much.

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад

      You're welcome! I'm really glad the video was easy to follow for you.

  • @relaxwithmusic9036
    @relaxwithmusic9036 Год назад

    This channel is one of the best channels on youtube for web dev

  • @duke4279
    @duke4279 2 года назад

    Great explanation, very easy to understand in a such short video, thank you Kyle really appreciate your work!

  • @ranjithr9625
    @ranjithr9625 2 года назад

    Thanks for explaining it in a very simple way. This is one of the best explanations of Async / Await.

  • @bhavesh2952
    @bhavesh2952 3 года назад +1

    You are a legend buddy :) Thank you. no intro and all like other RUclipsrs.. directly to the point

  • @heliodasilvajr.8981
    @heliodasilvajr.8981 3 года назад +1

    This is by far the best explanation/example about async/await.
    Thank you so much. 👍😉

  • @simungu
    @simungu Год назад

    Best explanation of async/await I have come across

  • @notdaveschannel9843
    @notdaveschannel9843 4 года назад

    Outstanding. No idea why this channel doesn't have 10x as many subscribers.

  • @EnatahNE
    @EnatahNE 5 лет назад +1

    I was so confused about promises/asynchronous codes. This SAVED me, thank you!

  • @bjmaldonado
    @bjmaldonado 4 года назад

    Well paced and not convoluted. Thanks!

  • @jeffdesouza6667
    @jeffdesouza6667 Год назад +3

    Thanks! I leaned heavily on your videos while I was in a bootcamp and now have a good paying job! Thank you so much for your help -- I've been meaning to buy you a beer for some time

  • @TomAinsworth94
    @TomAinsworth94 2 года назад

    Another awesome video thanks a lot Kyle! Just followed along with the Promise video and then this makes complete sense. Very helpful for an upcoming interview!

  • @muhammadusamaalvi6910
    @muhammadusamaalvi6910 3 года назад

    Beautifully explained, short and brief.

  • @adityabhandari6688
    @adityabhandari6688 2 года назад

    dude, you explain like 30min worth of content in less than 10min! Great!

  • @AJD...
    @AJD... 3 года назад +1

    Thank you so much! I finally understand Promises, Async & Await. Glad I found your video!!!

  • @_Potato_Salad
    @_Potato_Salad 2 года назад +1

    Thank you Kyle, for always making me feel a lot less dumb.

  • @7Chikchan
    @7Chikchan 4 года назад

    Clear and straight to the point. I like you. Thanks

  • @PawanKumar-tu6ti
    @PawanKumar-tu6ti 3 года назад

    Thanks a ton for this short content, easily understood and able to write code for it!

  • @syedsalman7737
    @syedsalman7737 9 месяцев назад

    Best explanation I've found and that too in only 7 minutes! You are amazing!

  • @aabedkashwa9125
    @aabedkashwa9125 4 года назад +7

    Ok, i am lucky to have you in my life. Thanks for simplifying this!

  • @bonaventureokoli7988
    @bonaventureokoli7988 4 года назад

    This is the best explanation of this topic period.

  • @imblind217
    @imblind217 3 года назад

    I like your tutorials! :D They are so clean and your voice is so nice to hearing. :)

  • @4rct1c9Ic3m4n
    @4rct1c9Ic3m4n 4 года назад

    Talks a mile a minute but a good teacher no less

  • @TheLMestre14
    @TheLMestre14 5 лет назад +5

    Really enjoyed the video. I already knew how to use async await in javascript, but your video explains it really well and it's much more simpler. Keep it up man ;)

    • @WebDevSimplified
      @WebDevSimplified  5 лет назад +5

      Thanks! I'm really glad you enjoyed the video. There are plenty more like this coming.

    • @IAm-zo1bo
      @IAm-zo1bo 2 года назад

      i really need to learn more

  • @mubeen44us
    @mubeen44us 4 года назад

    Thank you for clear instruction +1 for adding try catch in async function. Saved me from a day of headache. Cheers

  • @PrinceSingh-ym2mq
    @PrinceSingh-ym2mq Год назад

    Thanks man it really helped me to understand promises and async await which I was trying to understand for the long time. Keep up the good work👍

  • @bens9275
    @bens9275 3 года назад

    Didn't help me figure out my user interaction problems, but definitely a bookmark reference for async functions. Love your videos

  • @timl7728
    @timl7728 2 года назад +1

    Concise, to the point! Well done.

  • @michaelhuskey2608
    @michaelhuskey2608 2 года назад

    Great job man! I’ve only watched two videos but they have helped immensely!

  •  2 года назад

    The best explaination video I've watched. Thank you so so much.

  • @alexandroskourtis5268
    @alexandroskourtis5268 3 года назад

    simple and straight to the point

  • @freivincampbell
    @freivincampbell 4 года назад +2

    32 people still loving PHP .. jaja
    Thanks so much for your videos, I really love them, you are one of my best favorite channels on youtube. I usually never comment, but this time I had to do it. greetings from Costa Rica

  • @potatopower2144
    @potatopower2144 7 месяцев назад

    I feel like I just had a major "aha!" moment and it makes sense now. Thank you for all of the priceless information you continue to share with us

  • @blackaio
    @blackaio 5 лет назад +2

    You are awesome man, really simple to understand, async can be intimidating to new people, great work!

  • @consumeentertainment9310
    @consumeentertainment9310 Год назад

    Everything you have said sounded very logical to me. Thank you!!

  • @cineverseproductions
    @cineverseproductions 3 года назад

    Thanks for explaining it in a very simple way, mate. 🙌

  • @surjendupal4236
    @surjendupal4236 Год назад

    Thanks for this video. i think this is the most simplest and easily understandable video all over yt on async/await

  • @ayoolaoladipe8105
    @ayoolaoladipe8105 2 года назад

    This is the best async await video on youtube

  • @bradylange
    @bradylange 2 года назад

    Clear and concise video, thank you!

  • @srushtidesai7678
    @srushtidesai7678 4 года назад

    The best video of async await i could find online. Pretty much on the point,extremely easy to understand. I hope you upload more videos. Thank you so much.

    • @WebDevSimplified
      @WebDevSimplified  4 года назад

      I'm really glad you enjoyed it. I make two videos a week so I always have new videos being uploaded.

  • @sagargopale5747
    @sagargopale5747 3 года назад

    Very well explained. Easy to understand.
    Thanks

  • @ajayvallab
    @ajayvallab 4 года назад

    to the point and super clear. great job man !

  • @fabiorengel
    @fabiorengel 2 года назад +5

    I am learning JS and React and always works for me seeing your videos after some classes. Thank you.
    But, if I may say, would be even better if make the code you wrote available throughout some link. That way would be even easier to make some tests based on you examples.
    Thank you, again.

  • @MichaelCampbell01
    @MichaelCampbell01 3 года назад +1

    I have to keep coming back to this video to refresh my memory on this stuff.

  • @kimmokuisma7562
    @kimmokuisma7562 Год назад

    Love this channel, the best resource for learning React + JS for me!

  • @frankli673
    @frankli673 2 года назад

    Truly helped me to understand the topic, thank you!

  • @rodneytapit5636
    @rodneytapit5636 10 месяцев назад

    Just the right measure of knowledge and example code to pass on the idea, thank you it's a very good tutorial.

  • @graficandorealidades7561
    @graficandorealidades7561 2 года назад

    I loved that example. Thank you very much

  • @saitejagatadi9711
    @saitejagatadi9711 Год назад

    One of the greatest video I've watched in 2023

  • @dcmbassi
    @dcmbassi 4 года назад

    Been using this for weeks somewhat correctly, without understanding exactly why it works, and you just cleared that fog in seven minutes. Have a sub, sir.

    • @WebDevSimplified
      @WebDevSimplified  4 года назад

      Thank you so much. I'm really glad I could help.

  • @rustyrage4197
    @rustyrage4197 4 года назад

    one of the best videos on async functions

  • @mrdoner3451
    @mrdoner3451 3 года назад

    thanks dada! really though, this is the most concise explanation I've seen for async await.

  • @robertkviberg
    @robertkviberg 2 года назад

    Carl, You are doing a great job! The metafors you use to explan are genius. WDS is my goto chanel when I refresh or need new information. All Best

  • @rahultirkey7950
    @rahultirkey7950 3 года назад

    I understand the whole thing. Keep making more tutorials like that.