JavaScript Visualized - Closures

preview_player
Показать описание
Learn what closures really are behind the scenes! Let’s break it down with visualized examples, a little quiz, and some use cases. If you're newer to JavaScript, I highly recommend you check out more general resources on closures first; it might be a little intimidating to watch this if you don't have that knowledge! 🙏

Timestamps:
0:00 Intro
0:18 Execution Contexts and Environment Records recap
1:37 Function Objects
2:44 Closures
5:54 Closures Recap
6:22 Quiz
8:45 Use cases
10:55 Outro
Рекомендации по теме
Комментарии
Автор

💡Understanding how functions interact with their surrounding lexical environment is very important when working with JavaScript, and it's really not as mysterious as it might seem at times haha. I hope this video was useful, visualizing the detailed inner workings of tools I'm working with always helps me understand concepts better.

I only use Apple Keynote to create the visualizations! Implementation details might differ, this is just based on the ECMA spec. Different engines may implement smarter garbage collection strategies that mitigate issues related to retaining large scopes in closures (e.g. the fetchAllUsers example).

theavocoder
Автор

I'm so happy you're back. Please keep making these videos because they're the best out there. I hope you can eventually cover all JavaScript topics!

ilisiedenis
Автор

Ma'am you're doing fabulous job👏. No loud intros, no memes but original quality content which is class and extremely rare to find.

amitavasengupta
Автор

Yesss I’ve been waiting for this!! Thank you for keeping this incredible content going.

TerabyteTy
Автор

Great visual explanation of the concept that took me years to grasp back in a day - glad it will take less time for everyone who watches this! ;)

SergeyChernyshev
Автор

Wonderful video as always! I didn't realize closures hold a reference to the entire environment record: I hoped they were a bit smarter and only held references to the variables they actually used, allowing the GC to free the rest. Good to know!

filipbystricky
Автор

Your videos especially these visualized series are the best !

jdevstudio
Автор

"What an explanation! Please bring more content like this frequently."

AryanSharma-lgpn
Автор

Thank you so much ❤. You teach with great visualizations, with great explanations and with great smile. Please keep posting such videos of JavaScript🙏

hackytech
Автор

Lady, this is amazing! You have a talent for teaching. Visualization is your strong point. Thank you very much! ❤‍🔥❤‍🔥❤‍🔥

zlyeenu
Автор

Great work!
I learned nothing because, hey 🤷🏻‍♂senior js dev, but I think this kind of crystal clear visual explanation is really great for beginers!
I would have reduce headaches years ago if you had existed before Lydia !
Continue this way! :)

zephilde
Автор

Your videos are my happy day!!! They are like the a new chapter of my favorite show!!

elyoaprogrammer
Автор

Yes, Lydia and her cool diagrams are back... Thanks for making these.

chrislanejones
Автор

You are the only one that uploads a video purely for the thrill of actually teaching something new in your unique way and not one of those "new video every week" just for the sake of it. Please keep it this way.

musti-mm
Автор

The way you visualise these processes is amazing!
Your videos are so helpful and I'm really looking forward to your next one.

JosipaKu
Автор

Your videos continue to be the ones I look out for when learning JavaScript. Thank you Lydia we appreciate you.

dedmanraizd
Автор

Your visualisations are a true inspiration! Love the simplicity and clarity they bring 👍

Brandonverzuu
Автор

Amazing video!!
Please make a playlist for the all advanced topics in JavaScript(Hoisting, closures, this, FP, debouncing, throttling, polyfills, etc)

iamzeeali
Автор

This is so dang good. I knew _how_ closures worked, but I never knew _why_ closures worked. I feel like if I got asked this in an interview and gave this explanation, it would maybe catch the interviewers off guard. :D

starmechlx
Автор

Thank you for creating such a clear and informative video, Lydia Hallie! I would definitely recommend this video to anyone who wants to learn more about closures.

amahmuudd