- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
What is the scope of variables in JavaScript? | Block scope
What is the scope of variables in JavaScript?
#scope in #javascript is the area where we have valid access to #variables or functions.
#Global scope: The default scope for all code running in script mode.
Module scope: The scope for code running in module mode.
Function scope: The scope created with a function.
In addition, variables declared with let or const can belong to an additional scope:
Block scope: The scope created with a pair of curly braces (a block).
#example
{
var x = 1
let y = 1
const z = 1
}
console.log(x)
console.log(y)
console.log(z)
Scopes can be nested : An interesting property of scopes is that they can be nested.
Lexical scope: "The lexical scope consists of outer scopes determined statically."
Видео What is the scope of variables in JavaScript? | Block scope канала Codelys Learning
#scope in #javascript is the area where we have valid access to #variables or functions.
#Global scope: The default scope for all code running in script mode.
Module scope: The scope for code running in module mode.
Function scope: The scope created with a function.
In addition, variables declared with let or const can belong to an additional scope:
Block scope: The scope created with a pair of curly braces (a block).
#example
{
var x = 1
let y = 1
const z = 1
}
console.log(x)
console.log(y)
console.log(z)
Scopes can be nested : An interesting property of scopes is that they can be nested.
Lexical scope: "The lexical scope consists of outer scopes determined statically."
Видео What is the scope of variables in JavaScript? | Block scope канала Codelys Learning
ReferenceError "z" is not defined JavaScript Variable Scopes What Is the Scope of Variables in Javascript Scopes in Javascript Understanding Scope in JavaScript Variable Scope in JavaScript JavaScript Global global scope in javascript block scope in javascript How to access variable outside function in javascript global scope function scope local scope block scope javascript best javascript tutorial in bangla block scope js js block scope
Комментарии отсутствуют
Информация о видео
9 октября 2022 г. 19:32:55
00:10:23
Другие видео канала




















