Part-20(JavaScript Scope) JavaScript Bangla Tutorial

Опубликовано: 01 Ноябрь 2019
на канале: Iftekhar Mahmud
236
9

In the JavaScript language there are two types of scopes:

Global Scope
Local Scope
Variables defined inside a function are in local scope while variables defined outside of a function are in the global scope. Each function when invoked creates a new scope.

Global Scope:
When you start writing JavaScript in a document, you are already in the Global scope. There is only one Global scope throughout a JavaScript document. A variable is in the Global scope if it's defined outside of a function.

Local Scope:

Variables defined inside a function are in the local scope. And they have a different scope for every call of that function. This means that variables having the same name can be used in different functions. This is because those variables are bound to their respective functions, each having different scopes, and are not accessible in other functions.


На этой странице сайта вы можете посмотреть видео онлайн Part-20(JavaScript Scope) JavaScript Bangla Tutorial длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Iftekhar Mahmud 01 Ноябрь 2019, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 236 раз и оно понравилось 9 зрителям. Приятного просмотра!