Skip to content

Commit 441d9b9

Browse files
committed
Merge pull request nzakas#302 from shtr0m/fix-typo
Modules: Fix typo.
2 parents c62b54a + d9dbd73 commit 441d9b9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

manuscript/13-Modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Encapsulating Code With Modules
22

3-
JavaScript's "shared everything" approach to loading code is one of the most error-prone and confusing aspects of the languange. Other languages use concepts such as packages to define code scope, but before ECMAScript 6, everything defined in every JavaScript file of an application shared one global scope. As web applications became more complex and started using even more JavaScript code, that approach caused problems like naming collisions and security concerns. One goal of ECMAScript 6 was to solve the scope problem and bring some order to JavaScript applications. That's where modules come in.
3+
JavaScript's "shared everything" approach to loading code is one of the most error-prone and confusing aspects of the language. Other languages use concepts such as packages to define code scope, but before ECMAScript 6, everything defined in every JavaScript file of an application shared one global scope. As web applications became more complex and started using even more JavaScript code, that approach caused problems like naming collisions and security concerns. One goal of ECMAScript 6 was to solve the scope problem and bring some order to JavaScript applications. That's where modules come in.
44

55
## What are Modules?
66

@@ -259,7 +259,7 @@ console.log(color); // "red"
259259

260260
The comma separates the default local name from the non-defaults (which are also surrounded by curly braces). Keep in mind that the default must come before the non-defaults in the `import` statement.
261261

262-
As with exporting defaults, you import defauts with the renaming syntax, too:
262+
As with exporting defaults, you import defaults with the renaming syntax, too:
263263

264264
```js
265265
// equivalent to previous example

0 commit comments

Comments
 (0)