Skip to content

Commit 3dbe9d1

Browse files
committed
minor fixes
1 parent 1770074 commit 3dbe9d1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ import `./alert.js`; // Module is evaluated!
146146
import `./alert.js`; // (shows nothing)
147147
```
148148

149+
The second import shows nothing, because the module has already been evaluated.
150+
149151
There's a rule: top-level module code should be used for initialization, creation of module-specific internal data structures. If we need to make something callable multiple times - we should export it as a function, like we did with `sayHi` above.
150152

151153
Now, let's consider a deeper example.

0 commit comments

Comments
 (0)