JavaScript question detail
Give an example of statements affected by automatic semicolon insertion?
The javascript parser will automatically add a semicolon while parsing the source code. For example, the below common statements affected by Automatic Semicolon Insertion(ASI).
- An empty statement
- var statement
- An expression statement
- do-while statement
- continue statement
- break statement
- return statement
- throw statement