Async Await vs. Promises - JavaScript Tutorial for beginners

Поділитися
Вставка
  • Опубліковано 27 чер 2024
  • JavaScript Async Await, how to use them with Promises, and more importantly why?! This is episode 13 of 20 things Javascript Developers Should Know But Probably Don't.
    00:00:00 Intro
    00:01:04 How Promises work
    00:02:18 Await!
    00:04:00 Async!
    00:05:55 Async/Await vs. then block
    00:07:12 Real example with fetch()
    00:10:58 6 important points about Async/Await
    00:14:20 Error Handling with try/catch
    00:20:49 Final thoughts on Async/Await
    00:21:22 20,000!
    00:21:45 ColorCode Podcast
    00:22:22 ColorCode Merchandise Store 👕
    00:22:38 New website
    00:22:59 UA-cam Shorts
    00:23:12 Update on JS Mastery Course
    Links mentioned in the video:
    ColorCode Etsy Merchandise store:
    www.etsy.com/shop/ColorCodeSt...
    Episode 11: Asynchronous JavaScript:
    • Async JavaScript & Cal...
    Episode 12: JavaScript Promises:
    • JavaScript Promises -...
    JavaScript Promises in 1 Minute:
    • JavaScript Promises 👨🏻...
    Using Await without Async in JS Modules (MDN):
    developer.mozilla.org/en-US/d...
    Full playlist here: • 20 Things JavaScript D...
    JavaScript Promises from the series "20 Things JS Developers Should Know but Probably Don't"
    by ColorCode.io, Sina Jazayeri
    ** Announcement **
    Full JavaScript Mastery course is coming! Details at the end of the video. Sign up for Early Access here:
    www.colorcode.io/js-mastery

КОМЕНТАРІ • 302

  • @ColorCodeio
    @ColorCodeio  Рік тому +31

    Async Await 🧑🏻‍💻 Episode 13 of 20 Things JavaScript Developers Should Know but Probably Don't

    • @rishavmehra9437
      @rishavmehra9437 Рік тому

      go for it

    • @Justnadeem
      @Justnadeem Рік тому

      WHICH IDE DO YOU USE

    • @rishavmehra9437
      @rishavmehra9437 Рік тому

      @@Justnadeem bhai guitar sikkha da 😅

    • @c3cris2
      @c3cris2 7 місяців тому

      What tool are you using for isntant console feedback ?

  • @jl_117
    @jl_117 4 місяці тому +24

    this video saved me in an interview. I was asked to explain async/await code and remembered what this video taught me

  • @VaradNarvekar
    @VaradNarvekar Рік тому +28

    I cant be more thankful to you for providing such quality content !! I have never come across any person before who can explain things in sucha smooth wayyyy !! 2023 gonna be a wonderful year !!

  • @abdullah-ayyash
    @abdullah-ayyash 8 місяців тому +6

    This is by far the best Javascript tutorial in my opinion. I did watch JS tutorials on over 100 different channels and couldn't find any explanation that can compete with your explanation so thank you for the great content. You deserve millions of subscribers.

  • @fengz-x7z
    @fengz-x7z Рік тому +6

    I would suggest that you release "Javascript Mastery" course NOW! As a student, I don't need to go over your entire "Javascript Mastery" course. I just need to watch some of the videos on topics that I am struggling with, so just show us what you have, and charge us, students, on a subscription basis.

  • @copytopgrade6458
    @copytopgrade6458 Рік тому +3

    Underated chanel 😩 hope this thumb up break UA-cam algorithm 😂

  • @UnifiedFriends
    @UnifiedFriends Рік тому +3

    Long awaited, finally allSettled && fulfilled.

  • @matickovac
    @matickovac Рік тому +1

    Amazing explanation. Thanks so much!
    Can't wait for the next episode - would love to see tutorials even.

  • @taeyangyoo1941
    @taeyangyoo1941 Рік тому

    Thank you for sharing this tutorial! I got this concept of Javascript more clearly! Hope you keep going this work!! 🌞

  • @jatilyadav4000
    @jatilyadav4000 Рік тому

    Absolute genius....Your way of explaining is just the best on Yt

  • @RadoslavPhanVan
    @RadoslavPhanVan Рік тому +4

    Your way of explaining is something else (in a good way). I couldn't wrap my head around this topic but after watching this video it's piece of cake. Thank you

  • @mickeymacke1780
    @mickeymacke1780 Рік тому +1

    nearly at 22k a few days into the New Year. Congrats and THANK YOU for such great content.

  • @jpsingh1187
    @jpsingh1187 Рік тому +2

    Really liked the way you make others understand the concepts,repetition is the key.

  • @user-oz3xy9th3u
    @user-oz3xy9th3u 8 місяців тому +1

    the way you explain things in such an easy and well- structured way is honestly admirable, i was a bit lost and you helped clarify all the ambiguities i had

  • @bmehder
    @bmehder Рік тому +3

    Glad to see more videos in this series. It's been a while. I blame Craig.

  • @enjoy_programming
    @enjoy_programming Рік тому +2

    خیلی خوشحالم که توی طبقه 16 با شما اشنا شدم و شمارو شناختم🤩دیدن یک ایرانی که توی نیویورک هستش و برای شرکت بزرگی مثل ادوبی کار میکنه واقعااا به آدم انگیزه زیادی میده💫امیدوارم همیشه موفق باشید و اگه امکانشو داشتید ممنون میشم از مسیری که طی کردید هم توی ویدیویی یا ..... بگید تا مسیر برای برنامه نویس های جونیور داخل ایران که رویای کار توی شرکت های بزرگ رو دارن روشن تر بشه🔥به امید دیدار از نزدیک توی نیویورک ;)

  • @tetianazhuchenko2182
    @tetianazhuchenko2182 Рік тому +1

    That is the perfect study materials that you're doing. I've never seen something better. Thanks a lot for your job!

  • @poonamkhatri2782
    @poonamkhatri2782 Рік тому +1

    Keep coming with these videos...😍

  • @SuPern0vA72
    @SuPern0vA72 9 місяців тому +1

    Love your teaching style, thank you for providing high quality lessons/content 🙏🏻

  • @MohamedAhmed-tt2nz
    @MohamedAhmed-tt2nz Рік тому +11

    20 episodes might not be enough, great work again !!

  • @JoshIbbotson
    @JoshIbbotson Рік тому +4

    Honestly i've been learning for just over a year now and I come to your videos when i'm confused with a concept and need to sit down and understand it. I genuinely appreciate your videos and I hope you keep going long into my future career.

    • @ColorCodeio
      @ColorCodeio  Рік тому

      Thanks Josh

    • @simonshurety3870
      @simonshurety3870 Рік тому

      Joshy lad, fancy seeing you here! Did I share ColorCode with you or did you share it with me?

  • @Leesdjo
    @Leesdjo 6 місяців тому +1

    One thing special about this 20 video series is that you helped most of us in advanced for what we will soon encounter as we move on to take the software developer role in the future. Thank you. Your effort means a lot to me.

  • @user-kn4oi9oh4i
    @user-kn4oi9oh4i 3 місяці тому +2

    I am so afraid of this topic, but after you taught it, I finally got how it works. Thanks good sir!
    By the way, that coffee is the cherry on top of this video ❤

  • @vasudev16180
    @vasudev16180 Рік тому +3

    I can't wait for more content brother. Keep going.👍

  • @KelvinChibuikem
    @KelvinChibuikem 10 місяців тому +1

    Your delivery is a masterpiece, you make learning so fun. Thank you so much

  • @serapheogen
    @serapheogen 3 місяці тому +2

    I thought Brad Traversy was my favorite instructor on UA-cam, and I do love his work but I can't wait for your JS course. You don't miss a single step/detail out and that's invaluable. No need to jump around video to video to find a crucial missing piece of information that was missed from a video which got me 80% the way there but not 100%.

    • @ColorCodeio
      @ColorCodeio  3 місяці тому +2

      Glad to hear it! 🙏

    • @serapheogen
      @serapheogen 3 місяці тому +1

      @@ColorCodeio Do you have an idea yet of when it’s scheduled to release?

  • @user-jd6te1ss7u
    @user-jd6te1ss7u 8 місяців тому

    Thank you very much for a detailed and visually engaging explaination in terms of the animated code on the screen, the montage, and the way you're explaining the topic yourself. I am watching your js async related videos currently and making notes and actually comprehending this not so easy to grasp topic thanks to the way you present your explaination. This is quite a work to put all these pieces together that would result in such a high-quality content. Admire your work and time you put into it, thank you 🙂

  • @AlisaHaman
    @AlisaHaman Рік тому +8

    So good you might as well make it a 30 part series 😉

  • @prateekkukreja6576
    @prateekkukreja6576 Рік тому +1

    Hey Sina!
    I just wanted to give you a shoutout and let you know how much I've been enjoying your JavaScript tutorial videos on UA-cam! Seriously, you make learning JavaScript so much more fun and less intimidating than it would be otherwise.
    I've struggled to wrap my head around some of these concepts before, but you explain everything in a way that's easy to understand and not at all boring. Plus, you inject some personality and humor into your videos, which makes them even more enjoyable to watch.
    Keep up the fantastic work, and looking forward to seeing more awesome videos from you!
    Cheers.

    • @ColorCodeio
      @ColorCodeio  Рік тому

      Thanks for taking the time to write. Glad to hear all of the above. More videos coming soon.

  • @kmisdone
    @kmisdone 10 місяців тому

    My favorite place to learn about coding. Thanks for these amazing videos.

  • @Salah-YT
    @Salah-YT Рік тому +2

    glad to see u again bro and Happy New Year 2023 so keep it up good work with JavaScript thx

  • @IkeVictor
    @IkeVictor Рік тому

    love the quality content....keep it up!

  • @orrodrigez5051
    @orrodrigez5051 Рік тому +1

    thank you for quality content.
    watching this 2 month later your subscribers almost doubled itself! for a good reason!
    you gonna have to continue this to a 30 parts series :D

    • @ColorCodeio
      @ColorCodeio  Рік тому

      haha maybe, thanks for the sub 🤘

  • @PatrikRasch
    @PatrikRasch Рік тому +3

    I know these must take a ton of time, but please never stop 😂. These are super helpful and genuinely deserve a lot more views. I'm going through The Odin Project to get into webdev and your videos are both entertaining and educational.

    • @ColorCodeio
      @ColorCodeio  Рік тому +3

      Thanks Patrik. Good to see you here.

  • @grimquokka9843
    @grimquokka9843 Місяць тому

    really thank you for making it very simple in code with explanation. this is very unrated and exceptional video.

  • @jeevachaithanyansivanandan
    @jeevachaithanyansivanandan Рік тому +3

    Apart from all the technical side, I love the positive vibe this video delivers! Coding should be fun and enjoyable, very informative video and subscribed. I shall wait for your JS full course as well.

  • @chetansingh575
    @chetansingh575 6 місяців тому +1

    Please continue this series is dope.

  • @steelmantv
    @steelmantv Рік тому +2

    Hey man, just discovered your channel while cramming for a job interview next week. Thanks for the succinct explanations and dope style. Keep it up.

  • @puyakhalili
    @puyakhalili 4 місяці тому +1

    Incredible video. Thank you

  • @steelmantv
    @steelmantv Рік тому

    Love your channel! Thanks 👹

  • @codie12
    @codie12 Рік тому +2

    Nice explanation!!!

  • @oneaboveall7489
    @oneaboveall7489 Рік тому

    Thank You Very Much For giving smooth explanation for holy content.... awesome video.

  • @saferforenvironment5850
    @saferforenvironment5850 7 місяців тому +1

    Thankyou for this detailed yet follow along video
    Long live from Nepal 🇳🇵

  • @nagendradevara1
    @nagendradevara1 Рік тому

    Please keep us this phase of decluttering JavaScript concepts.

  • @ritikaphirani7753
    @ritikaphirani7753 Рік тому +1

    Much awaited video. Can you please make projects too on js and nodejs?

  • @ashishkumarsahoo6966
    @ashishkumarsahoo6966 Рік тому +7

    This is highest level quality content u are creating I have seen in UA-cam much respect love from India please make more videos on JS absolutely loving it it's more interesting even I have skipped my fab webseries to watch these masterpiece ❤

  • @pullrequest1481
    @pullrequest1481 Рік тому +1

    HELL YEAH!!! 💪🏽💪🏽💪🏽

  • @user-nl8wi2cg9x
    @user-nl8wi2cg9x 6 місяців тому

    Superb Content, you are Awesome.

  • @lloydchan9606
    @lloydchan9606 Рік тому +1

    underrated channel really, thanks for the goods

  • @msunrl8577
    @msunrl8577 Рік тому +1

    just found your channel, very nice and clear tutorials! thanks

  • @damianaruj3846
    @damianaruj3846 Рік тому +2

    Dude ur awesome!! Thanks for sharing ur knowledge

  • @user-sw3oz1hr8q
    @user-sw3oz1hr8q 2 місяці тому

    Audio Code... best name ever for your pod cast

  • @thibaultdeverge7601
    @thibaultdeverge7601 2 місяці тому

    I know is a bad practice but didn't even bother put a catch block on your video, i'm 100% sure the promised of good content will be fullfilled even before watching it :D ! Thank you for your work for the community !

  • @AberrahimCoder
    @AberrahimCoder Рік тому

    your way of teaching are top tier furthermore impressive

  • @arthurbulat9532
    @arthurbulat9532 Рік тому +1

    dude, you are doing amazing stuff! thank you and keep going please)

  • @abdohatemeldosoky
    @abdohatemeldosoky Рік тому +1

    Congratulations on +30k subscribers ❤

  • @zahrabt6705
    @zahrabt6705 4 місяці тому

    when is the podcast ready? can't wait for that! you're an excellent teacher btw keep going

  • @alirezsoltaan
    @alirezsoltaan 6 місяців тому +1

    Sina dadash damet Garm. First time I heard about asynchronous JavaScript coding was about 4 years ago and I did never completely understood how to use async, await, promise and then blocks until I watched your videos. Good F**** Job.

  • @faizadnan4029
    @faizadnan4029 9 місяців тому +1

    Great Lesson

  • @decentrob8126
    @decentrob8126 Рік тому +1

    Just subbed, watched some of your videos and your are really good att explaining!

  • @amarayassmine
    @amarayassmine 9 місяців тому +1

    you are legend man you helped me

  • @frontenddeveloper9173
    @frontenddeveloper9173 Рік тому +1

    Great videos 👍

  • @lordsambhav
    @lordsambhav День тому

    Thanks for making me laugh while teaching me how to fulfill my promises! 😊

  • @sarthakgiri4596
    @sarthakgiri4596 4 місяці тому +1

    This video deserves huge views and channel deserves million subscribers

  • @user-kt5id2vq7g
    @user-kt5id2vq7g 8 місяців тому +1

    you are a great guy🙏🙏

  • @namankeshari7332
    @namankeshari7332 11 місяців тому +1

    Crazyyy! This guy is super sleek and cool. Feel like I'm watching Netflix while watching your videos sir! Super cool!!

  • @hao12654
    @hao12654 Рік тому +1

    I would say it's 13 out of 10 for this video. great content. look forward to next episode.

  • @meryemk.4884
    @meryemk.4884 10 місяців тому

    Hearing Qoli's name kept taking my by surprise and made me smile a few times ahahah Great lesson!

  • @sashaikevich
    @sashaikevich Рік тому +1

    Great tuts!

    • @ColorCodeio
      @ColorCodeio  Рік тому

      🙏

    • @sashaikevich
      @sashaikevich Рік тому

      @@ColorCodeio for a bit more feedback, I particularly found it useful how you made the connection of between the next, catch functions and the resolve reject. Also, didn't know that I could have an error as the second parameter in next. Really thorough deep-dives, thank you!

  • @darshanpandya1087
    @darshanpandya1087 Рік тому +1

    your presentation of the topic so nice that i don't have to write it down and go to another site for clarifications and i liked it very much. Thank You > 3 : )

  • @lakshithamadhu
    @lakshithamadhu 6 місяців тому +1

    Great Work ♥♥♥♥

  • @scalaptia
    @scalaptia Рік тому +1

    Sina doing god's work fr

  • @TheCinematicTola
    @TheCinematicTola Рік тому +1

    Love you explanation

  • @simonshurety3870
    @simonshurety3870 Рік тому +1

    Tales from the reject block. (Podcast name suggestion)

  • @JeetKRamnani
    @JeetKRamnani Рік тому

    You are amazing men ❤️

  • @user-mw5bm2xh9x
    @user-mw5bm2xh9x 7 місяців тому +1

    thanks for the tips.

  • @lostone390
    @lostone390 7 місяців тому +1

    Спасибо за ролики. отличная подача и все понятно 😀

  • @ishankatoch7245
    @ishankatoch7245 5 місяців тому

    Really appreciate you putting these videos . These are really the best tutorial and is helping alot also can you please mention the actual date of the course you gonna launch?

  • @catherinelization
    @catherinelization Рік тому +1

    Always support🎉useful channel!

  • @iambrijeshtoo
    @iambrijeshtoo Рік тому

    Thank you ❤

  • @techbro3085
    @techbro3085 Рік тому

    Finally completed the series. waiting for new video.

  • @sagarbharati1438
    @sagarbharati1438 Рік тому

    Billion subscribers will be here one day. What a quality ❤️

  • @sfspmusic
    @sfspmusic 9 місяців тому +1

    Amasing content! Really, thank you, sir, for making this world better with your videos! BTW, how about some Angular videos if it's possible?

  • @mg-sp5ou
    @mg-sp5ou 9 місяців тому +1

    Thank you so much for your valuable lessons

  • @jasminelucas2842
    @jasminelucas2842 Рік тому +1

    Thank you dear, you are the best.😘

  • @awaismohsin345
    @awaismohsin345 Рік тому +1

    First Comment 👍👍👍
    I was waiting for a long time, Thank You Boss,

  • @nikolanovakovic4150
    @nikolanovakovic4150 Рік тому

    thank you senpai ^^

  • @maenam4520
    @maenam4520 4 місяці тому

    عشت ياكبير

  • @bilalbeny4172
    @bilalbeny4172 7 місяців тому +1

    thank yo so much, your are the best

  • @kyleh1623
    @kyleh1623 4 місяці тому +2

    tbh, this series deserves millions of views for all the devs out there who want to sort such js concepts out

  • @nordicnomad5473
    @nordicnomad5473 Рік тому +1

    Thanks a lot for the detailed information about async/await.
    I was struggling for a week to understand using fetch inside a loop. Now I know how to use the async/await .. if it is possible, please create a short video about using async/await inside a loop ,
    Thanks and subscribed !

  • @normanejm
    @normanejm 4 дні тому

    Thanks!

  • @Pareshbpatel
    @Pareshbpatel Рік тому

    JavaScript Async/Await; beautifully presented. Thanks, Sina
    {2023-06-21}

  • @LoneDWispOfficial
    @LoneDWispOfficial Рік тому

    Will be interesting a discussion about namespaces, in general, not just the namespace of typescript or Javascript. I didn't find any common dominant opinion in the community, and is being hard to find topics talking about it, if it's a bad practice, or a good one, if you can abuse or not, etc. In my opinion i love to put functions inside namespaces on my personal projects.

  • @struggler4448
    @struggler4448 Місяць тому

    thanks man

  • @user-op3co9di8i
    @user-op3co9di8i 5 місяців тому +1

    Your videos are amazing. I'm watching 3d in a row. Now async code is not a mess for me. Huge thank you. Also throughout all these videos I was wondering what ide are you using?

    • @ColorCodeio
      @ColorCodeio  5 місяців тому

      Chrome DevTools and RunJS: runjs.app/colorcode

  • @moryaffe7595
    @moryaffe7595 4 місяці тому +1

    46&2 ״just ahead of me” ☺️

  • @FarazBeg
    @FarazBeg 9 місяців тому +1

    I didn't know Stanley Tucci knew JS so well... thanks for the content..

  • @medmolay8627
    @medmolay8627 4 місяці тому

    maaan , i know i'am a bit late ,but i fuckin love you man , this playlist is the best thing that ever happened to me. it was realy helpful . (plus the qoli thing is really funny😭😭😭😭😭😭😭😭 )

  • @oleksandrfomin326
    @oleksandrfomin326 Рік тому +1

    Very quality content! It'd great if you could show how async/await works under the hood

    • @alex_blue5802
      @alex_blue5802 11 місяців тому

      I'm curious about this as well. How does resolve get set? When an async function returns a promise, how does the caller handle that?