From 164baba19336461d7371ce3d88f7c071b46f4141 Mon Sep 17 00:00:00 2001 From: Sarkis Kovlekjian <83559262+kenshanta@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:46:51 +0200 Subject: [PATCH] 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 --- .../javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/data/roadmaps/javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md b/src/data/roadmaps/javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md index 814b1de6a..f67504351 100644 --- a/src/data/roadmaps/javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md +++ b/src/data/roadmaps/javascript/content/global@oC4o6GLEES_nUgCJu9Q6I.md @@ -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)