var strname = some value
Scope of the Variable
- When you declare the variable within a function, the variable can only be accessed within that function.
- When you declare the variable outside the function, all the functions on your page can access it.
- The life time of these variables starts when they are declared, and ends when the page is closed.
No comments:
Post a Comment