English
Tamil Nadu Board of Secondary EducationHSC Science Class 11

What is scope of variables and types of scope variable? - Computer Applications

Advertisements
Advertisements

Question

What is scope of variables and types of scope variable?

Short Note

Solution

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
  Is there an error in this question or solution?
Chapter 14: Introduction to Javascript - Evaluation [Page 314]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 11 TN Board
Chapter 14 Introduction to Javascript
Evaluation | Q 2. | Page 314
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×