Automatic Semicolon Insertion

JavaScript will automatically insert semicolons (;) when a line break is encountered, but only under a specific set of circumstances. The concrete rules for ASI are described in the ECMAScript standard, and summarized below.

The return statement is transformed to return; 'something'; by ASI.

TODO

  • chained function calls

Was this page helpful?