Skip to content

Commit 006343a

Browse files
committed
minor fixes
1 parent 3e74537 commit 006343a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

1-js/13-modules/01-modules-intro/article.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,11 @@ That said, making such global variables is frowned upon. Please try to avoid the
123123

124124
### A module code is evaluated only the first time when imported
125125

126-
If the same module is imported into multiple other places, its code is executed only the first time, then exports are given to all importers.
126+
If the same module is imported into multiple other modules, its code is executed only once, upon the first import. Then its exports are given to all further importers.
127127

128-
That has important consequences. Let's look at them using examples:
128+
The one-time evaluation has important consequences, that we should be aware of.
129+
130+
Let's see a couple of examples.
129131

130132
First, if executing a module code brings side-effects, like showing a message, then importing it multiple times will trigger it only once -- the first time:
131133

0 commit comments

Comments
 (0)