Skip to content

Commit 503ba83

Browse files
authored
Merge pull request nzakas#314 from ronen-e/patch-1
Fix Export Statement Form
2 parents 91869c9 + dd89422 commit 503ba83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

manuscript/13-Modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function multiply(num1, num2) {
4949
}
5050

5151
// ...and then export it later
52-
export multiply;
52+
export { multiply };
5353
```
5454

5555
There are a few things to notice in this example. First, apart from the `export` keyword, every declaration is exactly the same as it would be otherwise. Each exported function or class also has a name; that's because exported function and class declarations require a name. You can't export anonymous functions or classes using this syntax unless you use the `default` keyword (discussed in detail in the "Default Values in Modules" section).

0 commit comments

Comments
 (0)