"JavaScript uses functions to manage scope. A variable declared inside of a function is
local to that function and not available outside the function. On the other hand,
global variables are those declared outside of any function or simply used without being
declared."
Source: Stoyan Stefanov - JavaScript Patterns
No comments:
Post a Comment