Merge pull request #2881 from leviding/patch-42

fix error in 1-js/13-modules/01-modules-intro/article.md
This commit is contained in:
Ilya Kantor 2022-02-18 17:38:24 +03:00 committed by GitHub
commit 883bd606d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.**