Advertisements
Advertisements
प्रश्न
What is scope of variables and types of scope variable?
टिप्पणी लिखिए
उत्तर
The scope of a variable is the life time of a variable of source code in which it is defined.
- A global variable has global scope; it can be defined everywhere in the JavaScript code.
- Variables declared within a function are defined only within the body of the function. They are local variables and have local scope.
shaalaa.com
JavaScript Variables
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?