Skip to content

Commit 758717d

Browse files
authored
Update README.md
1 parent d639c72 commit 758717d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3519,7 +3519,7 @@ $ `npm i` - and you're ready to go!
35193519
<a name="semicolons--required"></a><a name="21.1"></a>
35203520
- [21.1](#semicolons--required) **Use semicolons.** eslint: [`semi`](https://eslint.org/docs/rules/semi.html)
35213521

3522-
> Why? When JavaScript encounters a line break without a semicolon, it uses a set of rules called [Automatic Semicolon Insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion) to determine whether or not it should regard that line break as the end of a statement, and (as the name implies) place a semicolon into your code before the line break if it thinks so. ASI contains a few eccentric behaviors, though, and your code will break if JavaScript misinterprets your line break. These rules will become more complicated as new features become a part of JavaScript. Explicitly terminating your statements and configuring your linter to catch missing semicolons will help prevent you from encountering issues. In other words: You could say ASI is a feature to help out, when you _forget_ a semicolon. This doesn't mean you _shouldn't_ use them.
3522+
> Why? When JavaScript encounters a line break without a semicolon, it uses a set of rules called [Automatic Semicolon Insertion](https://tc39.github.io/ecma262/#sec-automatic-semicolon-insertion) to determine whether or not it should regard that line break as the end of a statement, and (as the name implies) place a semicolon into your code before the line break if it thinks so. ASI contains a few eccentric behaviors, though, and your code will break if JavaScript misinterprets your line break. These rules will become more complicated as new features become a part of JavaScript. Explicitly terminating your statements and configuring your linter to catch missing semicolons will help prevent you from encountering issues. In other words: You could say ASI is a feature to help out, when you _forget_ a semicolon. This doesn't mean you _shouldn't_ use them. Not using semicolons may also slow down the execution because of the additional parsing.
35233523

35243524
```javascript
35253525
// bad - raises exception

0 commit comments

Comments
 (0)