Update article.md
This commit is contained in:
parent
29216730a8
commit
79a1b9293b
1 changed files with 1 additions and 1 deletions
|
@ -182,7 +182,7 @@ alert(admin.name); // Pete
|
|||
|
||||
As you can see, when `1.js` changes the `name` property in the imported `admin`, then `2.js` can see the new `admin.name`.
|
||||
|
||||
That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other modules will see that.
|
||||
That's exactly because the module is executed only once. Exports are generated, and then they are shared between importers, so if something changes the `admin` object, other importers will see that.
|
||||
|
||||
**Such behavior is actually very convenient, because it allows us to *configure* modules.**
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue