JavaScript Closures Explained Simply

Поділитися
Вставка
  • Опубліковано 22 кві 2022
  • 📚Materials/References:
    MDN Web Docs: developer.mozilla.org/en-US/d...
    🌎 Find Me Here:
    Twitter: / realdevsage
    Discord: / discord
    Ebooks: payhip.com/devsage
    Merch: cottonbureau.com/people/devsage

КОМЕНТАРІ • 33

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

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

  • @Computeshorts
    @Computeshorts 2 роки тому +3

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

  • @UniversalKnowledge01
    @UniversalKnowledge01 2 роки тому +6

    Great explanation, very clear and understandable.

    • @DevSage
      @DevSage  2 роки тому

      Glad you think so!

  • @pauladeniyi5876
    @pauladeniyi5876 Місяць тому +1

    This guy should be on Udemy.

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

    Simple explanation with a understandable example - thank you!

  • @golden_oriel
    @golden_oriel 9 місяців тому

    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

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

    Clear and crispy

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

    Excellent presentation and explanation.

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

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

  • @GBlunted
    @GBlunted 8 місяців тому

    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

  • @andrewcenteno3462
    @andrewcenteno3462 9 місяців тому

    This guy is FREAKING Good!!!

  • @be2wa
    @be2wa 2 роки тому +2

    @DevSage you explain things really well, sir.

    • @DevSage
      @DevSage  2 роки тому

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

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

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

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

      😅 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. ua-cam.com/video/DwU6Q4bCAB0/v-deo.html
      It builds on top of the idea of closures

  • @dylanhall5305
    @dylanhall5305 Рік тому +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  Рік тому

      Glad I could help 😎

  • @OmarKhaled-nk6ln
    @OmarKhaled-nk6ln 2 роки тому +1

    Great video THANKS

  • @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.

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

    Thanks Man !

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

    Thank u ❤

  • @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?

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

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

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

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

  • @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

  • @2ncielkrommalzeme210
    @2ncielkrommalzeme210 Рік тому

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

  • @user-yj1jj9gp7z
    @user-yj1jj9gp7z 3 місяці тому

    Nice explanation

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

    Good