Closure in javascript

Поділитися
Вставка
  • Опубліковано 15 вер 2024

КОМЕНТАРІ • 62

  • @HiteshCodeLab
    @HiteshCodeLab  4 роки тому +5

    Full course is FREE and will be available here
    courses.learncodeonline.in/learn/Complete-Javascript-course

  • @ventures9560
    @ventures9560 8 місяців тому +1

    One of the plain (non programming) meaning of the word closure is "A bringing to an end; a conclusion." (you can look it up in a dictionary) - and this is exactly what a closure in programming is doing. When I looked up the plain meaning of the word and compared it to the technical aspect of what a closure (in programming) does it became obvious why they chose that name for the concept. That's the funny thing.. they try to choose names for these concepts that actually make sense in terms of what it does.
    Specifically speaking - to spell it out..
    - The inner function is being labeled as the "closure"
    - The outer function is waiting on closure
    - The inner function brings closure to the outer function
    - When the outer function has (or gets) closure it can complete (or be done)
    If you take the plain meaning of the word closure into the above bulleted points its clear what closure in programming is

  • @poojasonawane3309
    @poojasonawane3309 2 роки тому +5

    If you can explain the references part with the help of stack diagram then that would be easy for us to understand. The way you are explaining is good but it's difficult to understand.

  • @devyeasir4192
    @devyeasir4192 4 роки тому

    You are the man of cod. now i am earning for you.

  • @prayagparikh8020
    @prayagparikh8020 3 роки тому +1

    Who says Closure is difficult? Here is one of the richest video I have ever seen in a simplified way! Accept my Thanks

  • @gayathris2108
    @gayathris2108 3 роки тому

    Your passing reference to pointer concept made it better , to grasp the closures. Thanks

  • @shoaibsheikh863
    @shoaibsheikh863 3 роки тому

    literally awsome
    i bought a piad course for js.. but i found ur teaching method more worthy..

  • @aayush5474
    @aayush5474 4 роки тому +10

    Writing a compiler for js must have been painful

    • @grieferman6999
      @grieferman6999 4 роки тому

      ???????????????????????????????????????????

    • @abdremo
      @abdremo 3 роки тому

      haha yes

  • @Ravi-oh8xz
    @Ravi-oh8xz Рік тому

    Loved the way you EXPLAINED ❤️❤️

  • @clowndriver5576
    @clowndriver5576 3 роки тому

    Thanks bro. Best explanation so far.
    All the best

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

    Ever best explained JavaScript

  • @saibhanumathurthi903
    @saibhanumathurthi903 4 роки тому

    Hey there, everyone! Hitesh here back again with closures.. waiting for this concept since yesterday.. finally came 😊

  • @sivasai6890
    @sivasai6890 4 роки тому +1

    Happy vinayaka chavithi sir. ❤

  • @Pm80334
    @Pm80334 4 роки тому

    Best explaination on closure👍

  • @lalitkumarmehta1721
    @lalitkumarmehta1721 4 роки тому

    Thanks for the awesome explanation, I am following the tutorial from the start but if u add or state the particular name of the concept thaught then that can help other people while making search for a particular topic, like this topic is called *currying*.

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

    best expalination ever seen

  • @sunilkhadka5500
    @sunilkhadka5500 4 роки тому +1

    I was studying this topic today and here i get this video....law of attraction😂😂😂

  • @SamruddhaShah
    @SamruddhaShah 4 роки тому

    Hitesh tutorial = quality

  • @anum2471
    @anum2471 3 роки тому

    best explained ever!

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

    Thanks Hitesh

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

    Instead of-
    return function (y) {
    return x+y;
    }
    i typed-
    return function (y) {
    console.log(x+y);
    }
    1st output shows "9".
    2nd output shows "9 undefined".
    Why are we getting undefined here. Both the code means the same right?. Pls correct me.

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

      because you are only printing and not returning anything from the function.. Now you can place a return statement just below your console.log(x+y)

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

    well explained

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

    *absolutely amazing*

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

    you make it so complex rather than showing what the title saying... that is why low comment after a year...

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

    Thank you sir...

  • @kundannigam767
    @kundannigam767 3 роки тому

    thanks a lot, it is so amazing.

  • @ujjawalchatterjee
    @ujjawalchatterjee 4 роки тому

    doAddition funciton.... Now in this case... Is x = 4 or x = 5

  • @rudra844
    @rudra844 4 роки тому +1

    Thank you sir ❤😊

  • @ashutoshaman5649
    @ashutoshaman5649 3 роки тому

    I can't even predict the output. I wonder how will I be able to write such functions.

  • @thecapellett
    @thecapellett 4 роки тому

    There is a reason not to use Code Runner extension for VS code to run your JS files instead of node?
    Also, great job, Keep it up my man ✌

  • @dennysunny
    @dennysunny 4 роки тому

    Clean Explanation 🤙

  • @YouAndImpact
    @YouAndImpact 4 роки тому

    Great video 👍.

  • @dakshamdev
    @dakshamdev 4 роки тому

    Courses! Courses!! Courses!!! Courses!!!! Courses!!!!!
    So Many 😵

  • @arpitsoni9378
    @arpitsoni9378 4 роки тому +1

    Great video sir, one question, How much JavaScript is necessary to learn React and other js frameworks?

    • @ManishChauhan-fb7uz
      @ManishChauhan-fb7uz 4 роки тому +1

      Yes Absolutely. Once you know js very well then you can learn any library or framework with ease. JavaScript is the foundation

    • @SeekersforSeekers
      @SeekersforSeekers 3 роки тому +1

      100% important to learn ..learn advance JavaScript first then react will be easy to handle.(may be u ended up with this question but for any new person who read your question might want to get answer)

    • @maelstrom57
      @maelstrom57 3 роки тому +1

      @@SeekersforSeekers Mastering JS doesn't really make it easier to learn React. I have advanced knowledge of vanilla JS but I struggle with React.

    • @SeekersforSeekers
      @SeekersforSeekers 3 роки тому

      @@maelstrom57 people not having advance js knowledge puts double struggle

    • @maelstrom57
      @maelstrom57 3 роки тому

      @@SeekersforSeekers Not necessarily, there's many React devs that aren't very good with vanilla JS.

  • @saivivekravi4979
    @saivivekravi4979 4 роки тому

    Anyone can say what extension in vs code sir is using

  • @pranshuaggarwal
    @pranshuaggarwal 3 роки тому

    similar to concept of decorators in python

  • @namanxai
    @namanxai 4 роки тому

    Good

  • @shareer4177
    @shareer4177 4 роки тому

    Long awaited 😍👍

  • @BuyGyan
    @BuyGyan 3 роки тому

    Namaste javascript

  • @vijaynavale3919
    @vijaynavale3919 4 роки тому

    Keep going 👍

  • @vraj3115
    @vraj3115 4 роки тому

    #10minutesJS day 42!

  • @mrp3443
    @mrp3443 4 роки тому +1

    What is your Vs code theme name

    • @ujjawalchatterjee
      @ujjawalchatterjee 4 роки тому

      It is a custom theme. He has made it.

    • @pushkarc2049
      @pushkarc2049 4 роки тому

      The theme name is Ayu.He has just customized his sidebar of vscode

    • @anmol441
      @anmol441 3 роки тому

      if you still needs it, its available as a plugin on vscode, search for teacher's theme you'll find it.

  • @indrajit4025
    @indrajit4025 4 роки тому

    Sir, isn't the doAddition function which you implemented technically called currying? Anyways love all your content sir🔥

  • @amitnilekar3651
    @amitnilekar3651 3 роки тому

    💯

  • @yogeshkasar3704
    @yogeshkasar3704 4 роки тому

    hay

  • @deekshithrajbasa
    @deekshithrajbasa 4 роки тому

  • @navjyotsingh5386
    @navjyotsingh5386 4 роки тому +1

    💛💛💛That random person who'll like the Hitesh sir video ..may you and your parents live more than 100 years❤❤❤

  • @ermalgashimramori
    @ermalgashimramori 4 роки тому

    Thank you sir.