Understanding Asynchronous JavaScript

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024
  • Understanding asynchronous JavaScript is an important concept. This concept leads to a better understanding of callbacks and promises.
    For more resources on JavaScript:
    www.allthingsja...
    Full personalized courses on JavaScript:
    allthingsjavasc...
    Courses offered on Udemy: Getting Started or Advanced Topics at a huge discount:
    www.udemy.com/...
    www.udemy.com/...
    Tutorials referred to in this video:
    Understanding JavaScript Callbacks: • Understanding JavaScri...

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

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

    Amazing pace, clear voice, solid knowledge , mature and patient teaching. Sir , you are an awesome teacher.

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

    This is a very simplistic explanation. The execution of JavaScript is always synchronous from a call stack. What setTimeout does is delay the moment that a callback is pushed into the stack. And it will push into the stack after X milliseconds which means that it will actually be executed after all the stack is done executing. So it may not even be executed after X milliseconds. If this happens on a browser, other tasks may be executed before the callback like Dom rendering for example.

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

      It is async in a way as its not executed in the order of code written.

  • @ivangutowski-smith6514
    @ivangutowski-smith6514 Год назад +1

    he he, I watched one video, then each one keeps referencing other videos I should watch first. The rabbit hole goes so deep ha ha - thanks for linking the relevant mentioned videos

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

    Your channel has been a blessing

  • @muslimman30
    @muslimman30 6 лет назад +4

    The best Asynchronous example I ever heard. Thank you, sir

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

    Sir, you are a good instructor glad I found this video. Thank you!

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

    thx from brazil! excelent.

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

    Sir, your explanation is very lucid. I can't thank you enough.

  • @vivekvanga3588
    @vivekvanga3588 6 лет назад +4

    Thank you sir

  • @denniskamonde6836
    @denniskamonde6836 6 лет назад +4

    Thank you sir ....am glad you'll do promises next

  • @ismail-talb
    @ismail-talb 2 года назад

    Thank you from 2021🙂

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

    Thank you! Nobody explains JavaScript better than you! Is there a "async await" video? I wonder if i missed that somewhere.

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

      This is covered in my asynchronous class, but I haven't done a RUclips video on async await yet.

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

    Thank you, it really helped me revising the concept.

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

    this is pure gold

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

    nice videos

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

    Thank you :)

  • @Alexandru-OM
    @Alexandru-OM 6 лет назад +2

    Hello, can you please tell me what editor and what theme do you use?

    • @AllThingsJavaScript
      @AllThingsJavaScript  6 лет назад +1

      I use sublime text. The theme is the default, which I prefer.

    • @Colstonewall
      @Colstonewall 6 лет назад +1

      You should give VS Code a try, Oros. In many people's opinion, it's the best available. I've used a dozen or so Editor's over the yrs and a few IDE's, VS Code blows them all away.

    • @AllThingsJavaScript
      @AllThingsJavaScript  6 лет назад +1

      I'll have to look at it.

    • @Colstonewall
      @Colstonewall 6 лет назад +1

      Oh, there's no comparison between it an any other editor. SUblime and Atom can't hold a candle to it. I'd say you'll love it.

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

    Awesome!

  • @omichael003
    @omichael003 6 лет назад +2

    Do you cover promises in your course?

    • @AllThingsJavaScript
      @AllThingsJavaScript  6 лет назад +1

      Not in the courses that are currently released. I'm working on an Async course that will include promises.

    • @carlosfernandez6470
      @carlosfernandez6470 6 лет назад +1

      👍nice vid like always. Thanks

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

    Could have been an opportunity to introduce the Event Loop topic and Blocking Threads vs non-blocking threads.

  • @yamatube2574
    @yamatube2574 6 лет назад

    one of your videos is numbered 97 but i cant find the playlist for it.

    • @AllThingsJavaScript
      @AllThingsJavaScript  6 лет назад

      Here is the playlist for promises that includes 97: ruclips.net/p/PLTo9PCskHpbHIDnzl8tRYldSCSQaFgAHd
      Is that what you are looking for?

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

    it's not really the callbacks that makes it asynchronous but its the web APIs like settimeout which makes it asynchronous. its not like you create your own callback and it's magically asynchronous because javascript is songle threaded. the web APIs which aren't coming with the javasript runtime engine but with the browser is what makes thr ehole thing asynchronous

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

      Yes, true. However, without callbacks you couldn't make JavaScript asynchronous even if you had the web APIs. You need something to call back to the JavaScript environment.

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

    Play at 1.25x speed. It sounds like you're purposely talking slower than necessary to lengthen the video duration

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

    This is just a plug. Which I have to say, the guy has 20+ yrs of JS experince and his 'courses' are as weak as yesterdays unfinished can of beer. better of elsewhere if you want to understand callbacks, async