Closures in JavaScript: Practical Examples

Опубликовано: 24 Сентябрь 2020
на канале: In Plain English
6,001
164

When I learning how to code, I'd heard about closures but didn't really understand why people used them, what they were useful for, and how I'd write one. I'd often come across a makeAdder function that was used to expain closures in JavaScript and, while it kind of made sense, it didn't really highlight how I could implement them in real-life code. I'd heard things about scope trees and how it plays a part in closures but that didn't help me to understand any further.

This video aims to bridge that gap between knowing what a closure is, and how you can actually start using them in your JavaScript code today. There are two practical examples included. The first demonstrates about how you can use closures to create private values. The second demonstrates how you can create functions that are able to store values 'in memory' and continue to use those values way after a function has been executed. Hopefully this video will take your programming skills to the next level.


На этой странице сайта вы можете посмотреть видео онлайн Closures in JavaScript: Practical Examples длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь In Plain English 24 Сентябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 6,001 раз и оно понравилось 164 зрителям. Приятного просмотра!