Update global@oC4o6GLEES_nUgCJu9Q6I.md (#6683)
* Update global@oC4o6GLEES_nUgCJu9Q6I.md Provide additional details * Update src/data/roadmaps/javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md --------- Co-authored-by: dsh <daniel.s.holdsworth@gmail.com>
This commit is contained in:
1 parent
7f776808df
commit
164baba193
1 file changed
+5
@@ -2,6 +2,11 @@
|
||||
|
||||
Variables declared Globally (outside any function) have Global Scope. Global variables can be accessed from anywhere in a JavaScript program. Variables declared with `var`, `let` and `const` are quite similar when declared outside a block.
|
||||
|
||||
### Note:
|
||||
|
||||
If you assign a value to a variable that has not been declared i.e `potato = true`
|
||||
it will automatically become a _GLOBAL_ variable.
|
||||
|
||||
Visit the following resources to learn more:
|
||||
|
||||
- [@article@JavaScript Scope](https://www.w3schools.com/js/js_scope.asp)
|
||||
Reference in new issue
Block a user