Execution context and Call Stack

Поделиться
HTML-код
  • Опубликовано: 26 янв 2025

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

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

    This content is amazing! This is exactly what I was looking for. Thank you. I'm only 2 minutes into the video, and I had to pause it to make this comment.

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

    Wow! Thank you very much for such a nice and clear presentation which is quite easier to understand for beginners like me. I was a lot confused with the course I took currently, that's why, I look around and found yours as the best explanation so far.👍👍👍

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

    Great tutorial....Really enjoyed this javascript execution context

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

    amazing content!

  • @WeskerUmbrella4
    @WeskerUmbrella4 3 года назад +5

    Ah, so this is where the supposed solution to Global Execution Context being removed from the Stack is.
    Why do so many guides to advanced JavaScript refer to the Stack that still has GEC on it "empty"?
    That was always the confusing part to me as popping off the GEC from the Stack means that the script (program) has finished executing completely. And when you also understand that callbacks run after all functions have been popped off the Stack first, how can any function that also relies on global variables even execute afterwards without any errors, if the variables have been *garbage collected* from the Memory Heap?
    So in such guides, this was always the part not being explained properly - *how* and *where* does JavaScript keep values if GEC gets removed from the Stack and with it, removes all references to variables? How does this mystical code even work as asynchronous, if the variables or other values that were being stored in its memory, *get deleted* after GEC gets removed from the Stack?
    And the simple answer to this question:
    GEC *DOES NOT* get popped off the Stack as long as the Tab it runs in (environment) remains open.

    • @Behold-the-Florist
      @Behold-the-Florist Год назад

      If the asynchronous callback has closure over any variables, even if the callstack is empty and the callback is yet to be queued for execution the variables will remain in memory until they are unreachable.

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

    Hello would you kindly share your slides?
    It would be so helpful for learning thank you!

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

    thanks sir.. but i wanna one question .I have seen var self = this in some function .. kindly can you describe this topic .I will be very thankful to you

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

      Hi Farooq. Yes, in next few lectures I will explain this topic in detail.

  • @AJAY-hy1ju
    @AJAY-hy1ju 11 месяцев назад

    best bro thank you!

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

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

    ver ver y goos sir.

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

    Woow