JavaScript Closures Explained Simply

Поделиться
HTML-код
  • Опубликовано: 9 сен 2024
  • 📚Materials/References:
    MDN Web Docs: developer.mozi...
    🌎 Find Me Here:
    Twitter: / realdevsage
    Discord: / discord
    Ebooks: payhip.com/dev...
    Merch: cottonbureau.c...

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

  • @UniversalKnowledge01
    @UniversalKnowledge01 2 года назад +6

    Great explanation, very clear and understandable.

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

      Glad you think so!

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

    one of the best explanation of closures I've seen. Thanks @DevSage

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

    I came here after watching your recursion tutorial, which is the best recursion explanation on RUclips. Glad I found this one as well. Thank you!!

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

    This helped me comprehend closures. Using what you showed me. I was able to write my own closures and build upon it making it more complex over each iteration of adder(). This was so good I'm now helping my fellow students with closures. ty bro

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

    I'm a teacher of UI engineers and this video is awesome...

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

      😅 Appreciate that. If you don't already know about it, you and your guys may find some value in knowing how debouncing works as well. ruclips.net/video/DwU6Q4bCAB0/видео.html
      It builds on top of the idea of closures

  • @pauladeniyi5876
    @pauladeniyi5876 4 месяца назад +1

    This guy should be on Udemy.

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

    @DevSage you explain things really well, sir.

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

      Appreciate it. That means I'm accomplishing my mission 🎯💯

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

    Finally! I've watched a few of these now trying to understand and I feel this is the best explanation thus far! 👍🏽
    Would love to see some actual useful cases maybe

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

    Sir, the value of 'this' is lexical(static) scoped or dynamic scoped? I have a confusion. I think it's dynamic scoped because it gets its value through execution context. But I have already learned, JavaScript only uses lexical scope.

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

    DevSage , thanks for sharing this type of content your explain this very easy , Thanks a lot !!!!!

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

    Simple explanation with a understandable example - thank you!

  • @Tony.Nguyen137
    @Tony.Nguyen137 Год назад +1

    Is every function that has access to the „parent scope“ a closure? I have a simple global variable >let a< , and a simple single function add( ){console.log(a)}. The function add has access to the variable >a< which is outside its scope. Does it make this function add() a closure?

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

    I’ve been working with JavaScript for years and never have had as good an understanding of closures as I do now

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

      Glad I could help 😎

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

    Clear and crispy

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

    This guy is FREAKING Good!!!

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

    Great Content And Most Of it Working With C# Also SO Thanks A lot

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

      You are welcome

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

    Thank u ❤

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

    Excellent presentation and explanation.

  • @OmarKhaled-nk6ln
    @OmarKhaled-nk6ln 2 года назад +1

    Great video THANKS

  • @JibreelOfficial-zg9qt
    @JibreelOfficial-zg9qt Год назад +1

    Hey bro ! I really wanna know the name of the font you are using here in vscode or the theme

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

      Theme: SynthWave '84
      Font: Consolas

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

    Thanks Man !

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

    So is add10=x and y=the console.log 5?

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

    const add10=adder(10); is a closure i understand this. is it okay.?

  • @user-yj1jj9gp7z
    @user-yj1jj9gp7z 6 месяцев назад

    Nice explanation

  • @TheZayzoo
    @TheZayzoo 2 месяца назад

    Is this where stale state comes into play ?

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

    Good