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
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.
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*.
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.
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)
Full course is FREE and will be available here
courses.learncodeonline.in/learn/Complete-Javascript-course
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
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.
You are the man of cod. now i am earning for you.
Who says Closure is difficult? Here is one of the richest video I have ever seen in a simplified way! Accept my Thanks
Your passing reference to pointer concept made it better , to grasp the closures. Thanks
literally awsome
i bought a piad course for js.. but i found ur teaching method more worthy..
Writing a compiler for js must have been painful
???????????????????????????????????????????
haha yes
Loved the way you EXPLAINED ❤️❤️
Thanks bro. Best explanation so far.
All the best
Ever best explained JavaScript
Hey there, everyone! Hitesh here back again with closures.. waiting for this concept since yesterday.. finally came 😊
Happy vinayaka chavithi sir. ❤
Best explaination on closure👍
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*.
best expalination ever seen
I was studying this topic today and here i get this video....law of attraction😂😂😂
Hitesh tutorial = quality
best explained ever!
Thanks Hitesh
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.
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)
well explained
*absolutely amazing*
you make it so complex rather than showing what the title saying... that is why low comment after a year...
Thank you sir...
thanks a lot, it is so amazing.
doAddition funciton.... Now in this case... Is x = 4 or x = 5
Thank you sir ❤😊
I can't even predict the output. I wonder how will I be able to write such functions.
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 ✌
Clean Explanation 🤙
Great video 👍.
Courses! Courses!! Courses!!! Courses!!!! Courses!!!!!
So Many 😵
Great video sir, one question, How much JavaScript is necessary to learn React and other js frameworks?
Yes Absolutely. Once you know js very well then you can learn any library or framework with ease. JavaScript is the foundation
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)
@@SeekersforSeekers Mastering JS doesn't really make it easier to learn React. I have advanced knowledge of vanilla JS but I struggle with React.
@@maelstrom57 people not having advance js knowledge puts double struggle
@@SeekersforSeekers Not necessarily, there's many React devs that aren't very good with vanilla JS.
Anyone can say what extension in vs code sir is using
similar to concept of decorators in python
Good
Long awaited 😍👍
Namaste javascript
Keep going 👍
#10minutesJS day 42!
What is your Vs code theme name
It is a custom theme. He has made it.
The theme name is Ayu.He has just customized his sidebar of vscode
if you still needs it, its available as a plugin on vscode, search for teacher's theme you'll find it.
Sir, isn't the doAddition function which you implemented technically called currying? Anyways love all your content sir🔥
Yes it is currying brother
💯
hay
∞
💛💛💛That random person who'll like the Hitesh sir video ..may you and your parents live more than 100 years❤❤❤
Thank you sir.