You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/2022-10/js-scoping/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -84,7 +84,7 @@ As you can see in the above example we defined a variable in `script-1.js` and w
84
84
85
85
### Module Scope
86
86
87
-
Module scope is very similar to global scope, but with one minor difference. Minor scope variables are only available within the file you define them in. This means they cannot be used in other files which is ideal when trying to mentally keep track of everything. In order to enter module scope you need to use `type="module"` on your script tags. _This does much more than just change the scope so if you are unfamiliar with ES modules you should check out my [full ES module guide](/2021-11/es6-modules)._
87
+
Module scope is very similar to global scope, but with one minor difference. Module scope variables are only available within the file you define them in. This means they cannot be used in other files which is ideal when trying to mentally keep track of everything. In order to enter module scope you need to use `type="module"` on your script tags. _This does much more than just change the scope so if you are unfamiliar with ES modules you should check out my [full ES module guide](/2021-11/es6-modules)._
0 commit comments