Skip to content

Commit bcb47b7

Browse files
authored
Merge pull request #2612 from joaquinelio/patch-4
"not required" vs "incorrect"
2 parents 2290bd6 + 4c35f59 commit bcb47b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

1-js/02-first-steps/02-structure/article.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ alert(3 +
4646
+ 2);
4747
```
4848

49-
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so the semicolon is not required. And in this case that works as intended.
49+
The code outputs `6` because JavaScript does not insert semicolons here. It is intuitively obvious that if the line ends with a plus `"+"`, then it is an "incomplete expression", so a semicolon there would be incorrect. And in this case, that works as intended.
5050

5151
**But there are situations where JavaScript "fails" to assume a semicolon where it is really needed.**
5252

0 commit comments

Comments
 (0)