Reputation: 98
When writing Javascript without semicolons, \n
becomes the idiomatic statement terminator, but sometimes it is actually not, which I would like to express in my code. So is there a special character that explicitly prevents Automatic Semicolon Insertion, to alleviate this uncertainty?
Please note that I am actually in favor of using semicolons where possible, but some of the people I work with want to omit them.
Upvotes: 2
Views: 365
Reputation: 386624
Yes, it exists by using the grouping operator ()
. No ASI happens inside of the parentheses.
return (
// expression
);
Upvotes: 0