Scope in JavaScript Explained in 5 Minutes
Автор: 5-Minute Web Dev
Загружено: 2018-01-15
Просмотров: 8057
Описание:
Scope in JavaScript is an incredibly important concept to understand. Without having a grasp on it, even the most basic programs become close to impossible to write.
Scope refers to where your variables are accessible form within your program. JavaScript is lexically scoped, meaning where you write your variables is what determines their accessibility.
Scope in JavaScript is function (and sometimes block) scoped. This meaning that functions create their own variable scope, and the variables within them get scoped to that function.
Overall, there is one main important concept to understand: the scope chain. Inner scopes have access their outer scopes' variables. Outer scopes do NOT have access to their inner scopes' variables. In other words, your program will climb up the scope chain to search for variables, but it will not climb down it.
Повторяем попытку...

Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: