Skip to content

Commit 4d02719

Browse files
authored
Merge pull request #1531 from iArazar/patch-1
Missed function expression semicolon
2 parents be6856d + 7371945 commit 4d02719

File tree

1 file changed

+1
-1
lines changed
  • 1-js/02-first-steps/15-function-expressions-arrows

1 file changed

+1
-1
lines changed

1-js/02-first-steps/15-function-expressions-arrows/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ welcome(); // ok now
350350
```smart header="When to choose Function Declaration versus Function Expression?"
351351
As a rule of thumb, when we need to declare a function, the first to consider is Function Declaration syntax. It gives more freedom in how to organize our code, because we can call such functions before they are declared.
352352
353-
That's also better for readability, as it's easier to look up `function f(…) {…}` in the code than `let f = function(…) {…}`. Function Declarations are more "eye-catching".
353+
That's also better for readability, as it's easier to look up `function f(…) {…}` in the code than `let f = function(…) {…};`. Function Declarations are more "eye-catching".
354354
355355
...But if a Function Declaration does not suit us for some reason, or we need a conditional declaration (we've just seen an example), then Function Expression should be used.
356356
```

0 commit comments

Comments
 (0)