Main Menu

Categories

Subscribe

Variable Scope in JavaScript

March 17th, 2009

The scope of a variable is the region of your program in which it is defined. For example, a global variable has global scope and can be accessed anywhere in your script. A variable defined in a function cannot be accessed outside the function it was created.

No Comments

Leave a Reply