From 3dbe9d13fb5d778dafb1dde817bb8748efd8b7a0 Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 24 May 2021 11:29:27 +0300 Subject: [PATCH] minor fixes --- 1-js/13-modules/01-modules-intro/article.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/1-js/13-modules/01-modules-intro/article.md b/1-js/13-modules/01-modules-intro/article.md index 95bc9869..87418fdf 100644 --- a/1-js/13-modules/01-modules-intro/article.md +++ b/1-js/13-modules/01-modules-intro/article.md @@ -146,6 +146,8 @@ import `./alert.js`; // Module is evaluated! import `./alert.js`; // (shows nothing) ``` +The second import shows nothing, because the module has already been evaluated. + 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. Now, let's consider a deeper example.