Комментарии:
JavaScript closures! 🎉💻
ОтветитьThank you a lot
ОтветитьMan! I am a fan now. Take love from Bangladesh ❤
ОтветитьExcellent video explains it so well, I did some digging and found why it stays in memory.
So like quantum entanglement theory, the outer function is entangled with the inner functions so, the JavaScript engine uses garbage collection to clean up memory that is no longer reachable.
Because the inner function still has a reference to the outer function's environment, that environment is considered reachable and isn't garbage-collected. This allows the inner function to access variables from the outer function even after it has finished executing.
You are the best 🎉🎉🎉🎉
Ответитьهمش حسم بهم میگفت ایرانی هستی همینطور قلی گفتنات خخخ تا اینکه این ویدیو رو دیدم مطمئن شدم ایرانی هستی
ایول داری داداش از موش هم بهتری👏❤
I know he has a course he about to come out with. The thing is, I’m not going to stop learning, nor will I go backwards after understanding, and implementing many topics of your videos. I want to learn from you, but I don’t know how long it takes to create these courses. I will say, I’ve been learning JavaScript at an exceptional rate, and waiting on courses will not allow me to move forward with my goals. I’ll be well in to React by the time his course come out and it’ll not even be worth it for me.
ОтветитьBravo! Very nice explanation
ОтветитьWell Done
ОтветитьGREAT!
Ответитьcan you explain advanced react hooks like useMemo etc. Btw great presentation
Ответитьclosures are variables and functions that are within the components function.
ОтветитьYou’re great Sina!!! You’re god sent and put out quality content that clarifies JavaScript concepts that are sometime not very digestible for new developers and aspiring ones.
ОтветитьI didn't like the video. Maybe it's just me.
ОтветитьI know this is a year old video but it is still very helpful. I hate that I'm using closures but I don't know how to explain it.
It's like, watching a video in another language without subtitles. Though you can understand it, you can barely speak it. That's how closures to me are.
You are the best! 😍
Ответитьperfect
ОтветитьThis is incredible! Thanks for this!
ОтветитьThis is your teaching is pretty good...keeep continue dude
Ответитьexcelent video. Your talking is unique
ОтветитьThis channel rocks!
ОтветитьLol I'm here because my explanation of a closure in a recent interview wasn't that great.
ОтветитьAn excellent tutorial on JS Closures. Thanks, Sina.
{2023-06-19}
Bro is really coding in DevTools
ОтветитьThanks for your great explanation🙏 can you please have some c++ tutorials too??
Ответитьlmao... if you are new to javascript this tutorial is going to be hard to follow. Good luck.
ОтветитьIn your channel, the about section says, 'Coding Tutorials for regular people! 🎉👨🏻💻📽 '
but, you are irregular
😃
By the way, I'm a fan of your explanation style. I look forward for your video. 🥰
you are a great teacher . thanks for every video that's are provide javascript community. watching from Bangladesh 🇧🇩🇧🇩
ОтветитьAmazing. About halfway through I figured out....I have been using closures this whole time. Another great example is writing a custom hook to fetch in React. Great stuff. You describe things really well.
Ответитьweird block scope vs closure my mind is doing right now.
ОтветитьWow, Sina! Your last example on closures was exactly what I needed to finally appreciate their usefulness.
Previously, when passing a function to an event handler, I always wondered how I could pass something to that function while also passing it to the event handler.
I was concerned that it would execute immediately rather than when the event occurred, and that I would only have access to the event object.
However, your example has answered all of my questions.
Thank you so much, Sina! Your teaching style is phenomenal, and I would love to see you make a video tutorial on JS debouncing. I've watched a lot of videos on the subject, but I think your approach would be particularly helpful.
Very good tutorial. That click handler example was too good. I used onClick in place of onclick and struggled for half an hour 😪
ОтветитьIts not for beginners .. i might need 2 or 3 years so i can reach the level so i can understand..
Ответитьgreat video, thanks a lot for the effort
Ответитьyou are so great and also your explanation is so great. thank you so much.
Ответить3
ОтветитьI have found the following two situations in websites with closures. I am wondering if you can shed light on why people would do this?
First, a function is invoked at return. Like the following (note that the wt function does not return a value):
return wt()
Second, a variable being set in a return. Like the following:
return t.m = e
If anyone that sees this can shed light on this it would be greatly appreciated. I'm utterly confused as to why anyone would do those.
QOLI 🤣🤣
Ответитьsuper!! explained l
Ответитьthanks
ОтветитьNew Subscriber... Just loved your content...Want to gain more knowledge from your content... Keep uploading Best of luck Sir.........
ОтветитьIsn't it the whole idea behind the class?
ОтветитьWhat a great class you have brought us! I agree with you that this is a very though theme, but you had explained it with in a terrific way! Thank you Sina Qoli! 😃
Ответить