Skip to content

Commit

Permalink
get-started, ch2: fixed minor typo
Browse files Browse the repository at this point in the history
  • Loading branch information
getify committed Feb 7, 2022
1 parent 7d6e458 commit 58262fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion get-started/ch2.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ It may surprise you to consider separate .js files as separate JS programs. From
| :--- |
| Many projects use build process tools that end up combining separate files from the project into a single file to be delivered to a web page. When this happens, JS treats this single combined file as the entire program. |

The only way multiple standalone .js files act as a single program is by sharing their state (and access to their public functionality) via the "global scope." They mix together in this global scope namespace, so at runtime they act as as whole.
The only way multiple standalone .js files act as a single program is by sharing their state (and access to their public functionality) via the "global scope." They mix together in this global scope namespace, so at runtime they act as a whole.

Since ES6, JS has also supported a module format in addition to the typical standalone JS program format. Modules are also file-based. If a file is loaded via module-loading mechanism such as an `import` statement or a `<script type=module>` tag, all its code is treated as a single module.

Expand Down

0 comments on commit 58262fb

Please sign in to comment.