JavaScript Closures

Опубликовано: 30 Март 2026
на канале: CodeWorkr
3,293
106

In this video we'll learn about JavaScript closures. We'll start by reviewing some of the properties that functions in JavaScript have and then we'll start working on two examples.

First example is going to show us that we can access global variables (declared outside function's body) in our function and that itself is a simplest example of a closure.

Second example is going to show us how we can use closures and leverage their powers. We're going to be able to protect/hide some data and only expose the functionality that we want. We are also going to use some real world example problem that should hopefully make a ton of sense for you!

Note: I did upload it and then took it down because audio setting was rather low, hence me re-uploading it again.

Link to repository:
https://github.com/eXtremeXR/Closures...

Enjoying my videos and want to buy me a coffee?
https://www.paypal.me/CodeWorkr