JavaScript Tutorial in Hindi for Beginners [Part 22] - Global variable vs Local variable
In this video i will talk about Global variable vs Local variable in JavaScript. In JavaScript there are two types of scope: Local scope Global scope JavaScript has function scope: Each function creates a new scope. Scope determines the accessibility (visibility) of these variables. Variables defined inside a function are not accessible (visible) from outside the function. Local JavaScript Variables Variables declared within a JavaScript function, become LOCAL to the function.