Asynchronous Vs Synchronous Programming

Поделиться
HTML-код
  • Опубликовано: 13 июл 2024
  • Asynchronous code can be incredibly confusing and frustrating for anyone learning programming. In this video I will explain what asynchronous and synchronous code talk about their differences through the use of multiple examples.
    Twitter:
    / devsimplified
    GitHub:
    github.com/WebDevSimplified
    CodePen:
    codepen.io/WebDevSimplified
    #JavaScript #WebDevelopment #Programming

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

  • @nathalierautell5259
    @nathalierautell5259 4 года назад +191

    I love that you are straight to the point with a clear and short explanation. It makes things a lot easier. Appreciated! 🤩

  • @richardwalters9249
    @richardwalters9249 4 года назад +88

    seems that, if you get things confused, you can replace synchronous with the word "sequential"execution ... and asynchronous with "parallel" execution. Which type blocks will also become clear as well.

    • @GerardBeaubrun
      @GerardBeaubrun Год назад +4

      My good sir, that's such a great way to summarize it

    • @JasonEdokpa
      @JasonEdokpa Год назад +11

      @@GerardBeaubrun Not quite. JavaScript isn't parallel as it is runs as a single threaded process. For asynchronous functions is uses an event loop.

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

      @@JasonEdokpa exactly

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

      ​@@JasonEdokpa smart man

  • @srikanthathikari9995
    @srikanthathikari9995 3 года назад +10

    100% crystal clear explanation. I was looking at videos that are lengthy, I could not get my head around them. Really liked the way you explained async with then example. Thanks tons.

  • @saritadas7716
    @saritadas7716 4 года назад +5

    every single video from your channel clears so many concepts in my head, i cant even start to tell you..thank you so much from the core of my heart

  • @billynovrando9383
    @billynovrando9383 4 года назад +64

    "Not every single function that takes an argument is asynchronous, but in general, most function that takes function argument are going to be asynchronous"
    Thank you, this line clears things for me. Much appreciated

  • @SiRexable
    @SiRexable Год назад +40

    Nice explanation, but just to add even if you put setTimeOut 0ms it will still excecute last after all synchronus code is done and stack is empty. Thats because async funtions appear on the stack at call time and are immediately pushed off and added to webapis stack where count down begins and since its 0 so the callback of setTimeout gets immediately it gets pushed to task queue ( not call stack ), where spinning event loop is gonna pop this callback function on the main stack once its empty. So even if you have 5 set time outs with 0 ms and 1 console log at the end set timeouts gonna run after console.log because as i mentioned above async functions are pushed back on stack only after main stack is empty

    • @thucle4122
      @thucle4122 Год назад +1

      lucid explanation, thanks man

  • @jthomasaurus
    @jthomasaurus 4 года назад +8

    Always a great resource for me, short and full of relevant info. Plus I like the clicky keyboard sounds. Awesome video, yet again! Thanks, Kyle!

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

      I totally agree. Especially the clicky keyboard part!

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

    Love all of your videos! You make everything so easy to understand! Thank you!!

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

    Your videos are straight to the point and that just amazing. Thank you for making them.

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

    You have explained the concept so well! Thank you : )

  • @queenscript
    @queenscript 3 года назад +20

    Wow, as someone who feels more intermediate than total beginner, I felt that you really validated my learning curve. Thank you!

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

    Keep it simple and objective just as you are. You clarify the web dev in a way its much easier to learn. For a non native english speaker, your chanel is one of my favorite learning resource. Thank you very much and my best reggards from Brazil. (:

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

    I am a big big fan of your short & crisp concept clearing videos 🧡🧡🧡

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

    Thank you for getting to the point, and explaining this concept in clearest possible terms.

  • @hozay6552
    @hozay6552 5 лет назад +28

    Short and helpful, thank you very much! =]

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

    This was very helpful Kyle, thank you!

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

    Thanks alot. I have learned promises callbacks and async await but still I was confused between async and sync terms. Your example completely cleared all concepts async JS.

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

    Such a simple and effective way to explain this. 🤙🏻🖤

  • @BadalKumar-pi7ud
    @BadalKumar-pi7ud 2 года назад

    Spot On. The way you explained everything so easily. it is appreciable.

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

    Thanks, your clear explanation helped me understand this concept better. :)

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

    Killer explanation, you made some stuff clearer for me in no time.

  • @kimkim-bm8he
    @kimkim-bm8he Год назад

    you are the best youtube web dev creator. Love the show. My tip is that instead of having to type console.log() each time. Just type log and vscode will auto complete the code for you. THanks for the video

  • @AmitKumar-ix3kq
    @AmitKumar-ix3kq 3 года назад

    Simple , Short , Concise. Thank You.

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

    Thank you so much, This tutorial helped me a lot to get the concept clear.

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

    Awesome! Thanks for this video.. You have explained the concepts very well

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

    Wow very straight to the point.... Awesome! Double thumbs up

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

    Whaaat, didnot know of this before your video. Thank you very much for sharing this

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

    pretty clear and straightforward explanation ..... Thanks !!

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

    Nice explanation. Simple and clear!!

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

    thank you brother!! very well explained!! keep it coming!!

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

    excellent video mate! Really helpful!

  • @Ari-pq4db
    @Ari-pq4db 5 месяцев назад

    Thank You sir , You have cleared the doubts that were blowing my head ❤

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

    Great video man! You helped a lot.

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

    The best in explaining stuff.......big ups man

  • @useruser-bv1ej
    @useruser-bv1ej 3 года назад

    Thanks, The first video that helped me!

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

    Well explained! Best I have seen.

  • @anilsuyal
    @anilsuyal 8 месяцев назад

    Thanks sir. It was really simple explanation!

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

    Thanks a lot, I really tapped into the concept

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

    I searched and searched, nothing helped me...and on top of that, those things made me confused :(, but you just made it soo easy for me!!!! Thank you! subbed!

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

    Explained wonderfully 🙏

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

    Thank you ! Learned a lot in just 7 minutes !

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

    Thank you man ! That was very helpful

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

    the best explaination of the async feature in js ever

  • @greenstreet704
    @greenstreet704 Месяц назад

    great explanation. thanks!!

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

    It took me watching 4 videos until I found this one. It was perfect!

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

    very clear explanation, good examples
    thank you man 👌👌👌

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

    Awesome explanation!!!!

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

    Thank you so much, this was helpful

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

    This helped a lot. Thanks a lot!!!

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

    Very straightforward explanation thank you and godbless you.

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

    Short and sweet!💯

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

    Thank you i love the way you explain things .

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

    Thank you very much it was concise and helpful

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

    Thank you! This makes a lot of sense

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

    Thank you. Good video, very clear.

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

    Short, clear video on Async Programming. Thanks.
    {2021-07-20}

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

    Very good explanation of the concept.

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

    Thanks for the video, i can get more understanding about async js 👍

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

    Thank you for the explanation

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

    Brilliantly explained!

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

    Great explanetion, thanks.

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

    Thank you it's really helpful for me.

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

    Wow! Thanks 💙
    You gained a sub

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

    thanks, bro you have clear this concept abut sync and async with nice example

  • @pamintuanjohnjosuahm.2492
    @pamintuanjohnjosuahm.2492 Год назад

    Thank you, Kyle!

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

    thanks for the video Kyle

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

    thank you for this great explanation

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

    nicely done, thank you!

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

    Very well explained

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

    Thanks I got a clear understanding about asynchronous programing :-)

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

    Helpful and very very clear

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

    Very good explaination

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

    So clear thank u

  • @stith_pragya
    @stith_pragya 11 месяцев назад

    Thank You So Much Brother.......🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻🙏🏻

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

    Very good explanation

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

    Wooooow I couldn’t understand the difference between synchronous and asynchronous code until a I watched his video thank you!

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

    THANK YOU!! FINALLY SOMEONE

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

    Dude, you just gave the best start to learn more about Async Programming.
    btw, whats your VS code theme, font, setup...

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

    Great video, great concepts!

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

    great video. I am more confused about scope within the Async function. can you assign a value to global variables within an Async function. for some reasons, I cannot seem to get that to work

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

    Great work man.

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

    clear and concise

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

    Thanks for a great video.

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

    Thank you ive been confused

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

    awesome explanation

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

    Love your newsletter

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

    Thank you very much :)

  • @Richard.halabi
    @Richard.halabi 3 года назад

    thanks for the concept you know to explain thanks.

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

    Thank you!

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

    Thank you for making my life easier 🤩

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

    Your videos are so ... I am lost the words wonderful.

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

    you deserved a sub bro

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

    So I tried passing a variable into the setTimeout() handler and the handler implemented instantly with out waiting. Any idea why this happens?

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

    Thanks pal!

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

    thanks man i was always confused about that

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

    Given the scenario mentioned in the video, how can we get a =1 instead of a becoming 10 for an async operation?

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

    very good explanation

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

    well explained👍👍

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

    I love your keyboard sound whenever you typed which makes me motivated.

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

    Hi, Can you make a video on how javascript works while executing the code internally? Thanks a lot! And amazing videos thank you!!