You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"`import` allows to import functionality.." -> "`import` allows the import of functionality..."
"relative the current file" -> "relative to the current file,"
Copy file name to clipboardExpand all lines: 1-js/13-modules/01-modules-intro/article.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,7 +24,7 @@ A module is just a file. One script is one module.
24
24
Modules can load each other and use special directives `export` and `import` to interchange functionality, call functions of one module from another one:
25
25
26
26
-`export` keyword labels variables and functions that should be accessible from outside the current module.
27
-
-`import` allows to import functionality from other modules.
27
+
-`import` allows the import of functionality from other modules.
28
28
29
29
For instance, if we have a file `sayHi.js` exporting a function:
30
30
@@ -45,7 +45,7 @@ alert(sayHi); // function...
45
45
sayHi('John'); // Hello, John!
46
46
```
47
47
48
-
The `import` directive loads the module by path `./sayHi.js` relative the current file and assigns exported function `sayHi` to the corresponding variable.
48
+
The `import` directive loads the module by path `./sayHi.js` relative to the current file, and assigns exported function `sayHi` to the corresponding variable.
0 commit comments