Are there any reasons, apart from subjective visual perception and cases where you have multiple statements on the same line, to use semicolon at the end of statements in JavaScript?  It looks like that there's plenty of evidence suggesting that use of semicolons is highly optional and is required in only few of the specific cases.
13680
In many situations, JavaScript parsers will insert semicolons for you if you leave them out. My question is, do you leave them out?  If you're unfamiliar with the rules, there's a description of semicolon insertion on the . Here's the key point:     If the first through the nth tokens of a JavaScript program form are grammatically valid but the first through the n+1st tokens are not and there is a line break between the nth tokens and the n+1st tokens, then the parser tries to parse the program again after inserting a virtual semicolon token between the nth and the n+1st tokens.   That description may be incomplete, because it doesn't explain @Dreas's example. Anybody have a link to the complete rules, or see why the example gets a semicolon? (I tried it in JScript.NET.)   is related, but only talks about a specific scenario.
8514
I often see people on the Internet using a comma before and in many cases (not adversative cases). Is it ok? In my language it is stricly prohibited to use a comma before an and except for adversative cases or when an apposition is in the front of that and. Examples (which I consider not ok):  He is a great player, and he prefers to play Counter-Strike. John joined the Army, and George joined the Marines.  What I consider exceptions:  Yes, and what is the problem? I called John, my brother, and now I’m speaking with him.
96953
In certain styles of text I define \parindent 0pt in the preamble and write the text in this manner:  paragraph 1\\  paragraph 2\\   and so forth. I wonder if there is anything I can include in the preamble for instance to modify how the end of paragraphs are interpreted so I don't have to include the \\ at the end of each?
19595
I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like $name and $order)
46108
When an adverb is the last word in a sentence, is it preferable to insert a comma before that word or to leave it as is (with no comma)? For example:  How many employees, roughly? or How many employees roughly? How long was the driveway, approximately? or How long was the driveway approximately?
122159
Is there a way to have a statement across multiple lines without the underscore character?  It is really annoying in multi-line strings such as SQL statements, and especially  queries.  Beside from the ugliness and difficulty when changing a line (nothing lines up anymore), you can't use comments in the middle of the multi-line statement.  Examples of my daily personal hell.  dim results = from a in articles _               where a.articleID = 4 _ ' articleID     - Nope, can't do this               select a.articleName   dim createArticle as string = _     "Create table article " &amp; _     "    (articleID int " &amp; _     "    ,articleName varchar(50) " &amp; _     "    )"
52362
Suppose the following chunk of code:  lines = text.split`\n`   Not relevant, but it is valid ES6 code  My question is: How to write it inside one comment? When I use backticks around content it displays the content formatted as code. But what if there are backticks inside this content?
53638
I've seen a few questions on this site relating to semi-colons, which I believe I correctly understand, but what I'm not as clear about is colons.  For example:     The man ate the apple; it tasted good.   Is this not correctly also written as:     The man ate the apple: it tasted good.   In this case, what is the difference between the two sentences?
19664
Are there rules of usage when using the ampersand "&amp;" instead of "and"?  Are they completely interchangeable?   The ampersand seems more casual, but I'm not sure.
67260
Help! I've read everything there is on Google re: semicolon and dash use and, whilst I understand all this, I still struggle deciding when to use a semicolon over a dash to join two independent clauses. I'm an avid endasher (from UK, so endash used more than emdash), and due to their increasing prevalence in newspapers etc, I think I'm a little desensitised to them. Consider the following:  Sorry I didn't get round to helping; it's been a difficult week Sorry I didn't get round to helping - it's been a difficult week I couldn't go to work; I was feeling too sick I couldn't go to work - I was feeling too sick I ate all the food; I was starving I ate all the food - I was starving That's not borrowing; that's stealing That's not borrowing - that's stealing  Now, I feel I say all of these aloud with some sort of emphasis, so I naturally hover over the emdash. So my question is... How do I decide whether my joining clause is dramatic enough to warrant a dash? I understand dashes are more frequent in informal writing (and, if I'm being honest, I'd find myself 'stuffy' using them in emails etc) but, regardless, I'd like to at least feel I know when the semicolon is more appropriate, even if I choose not to use it! Can anyone help? Thanks in advance!
107940
In school, we were taught to end each list item with a semicolon. But I have never actually seen this. Can somebody please confirm this? Should we end each list item with anything at all?  I've seen people use periods after each list item, colons, and even commas. But I've never seen a semicolon at the end of each item — and even if I have, it would be that rare that I've forgotten.  Example:   item; item; item; item
49282
Doing some editing and came across a sentence in which a colon is used to introduce a quote.  Is the colon justified in this case? SENTENCE ENDS:     ...wearing a T-shirt that says: "When the going gets tough, the tough get going."    The following question () is actually focused on a slightly different issue, since it is about using a colon to introduce a quotation after a complete sentence.  The answers to it seem to be geared toward that example; one of them cites a Purdue OWL post that says it is appropriate to use a colon to introduce a quotation after a complete sentence or independent clause. But that is not the case here, since "a T-shirt that says" is not a complete clause or statement.   One answer (by Roaring Fish) quotes a "" by Larry Trask that seems to say that it is "bad style," but not outright "wrong," to use a colon in the sentence "President Nixon declared: 'I am not a crook.' " This seems relevant, but it's a bit confusing. Why doesn't Trask just label this "wrong"? Is it a matter of opinion? I'd appreciate other references that describe the most common and influential viewpoints about how to punctuate phrases like this.
93997
I would just like to clarify if in this kind of sentence, where you state the name of a person, are commas always needed to offset Anne?     His sister, Anne, was not feeling well.   Or is it acceptable to remove the commas? If yes, when?  Thank you!
42746
Should I use exit() or just return statements in main()? Personally I favor the return statements because I feel it's like reading any other function and the flow control when I'm reading the code is smooth (in my opinion). And even if I want to refactor the main() function, having return seems like a better choice than exit().  Does exit() do anything special that return doesn't?
80994
What is the etiquette to denote the end of an example or remark? For proofs, it's the QED symbol (white box). I know it's not necessary for everyone, but I would like to use it to break up the text a little. What should I use? A circle or filled box or what?
65118
When you have a form with fields and captions for these fields, should you do it like that:  Field1: [                       ] Field2: [                       ]   or like that:  Field1  [                       ] Field2  [                       ]   I saw both used in popular application. Microsoft generally uses colons (My computer properties -> Computer Name tab is one example). Opera browser doesn't use colons as separators on forms (example: Preferences form).  I personally don't have a strong opinion on which one is better. But I'm working on this "1000s of winforms" app where I suspect we have forms with and without colons so I would really like to set a standard and go one way or another on all forms because the inconsistency is far worse than any of the options.
46565
The answer to  clearly explains the standard rule that when you have multiple quoted paragraphs, each new paragraph starts with an opening quotation mark, but only the final quoted paragraph has a closing quotation mark at its end.  This  agrees:     Quotation marks are used for multiple-paragraph quotations in some cases, especially in narratives. The convention in English is to give opening quotation marks to the first and each subsequent paragraph, using closing quotation marks only for the final paragraph of the quotation [ . . . ]   However, neither explains why this is the standard practice.  What good does it do? What is it trying to avoid?  What harm would occur if it were ignored and people put both opening and closing quotation marks on each adjacent quoted paragraph?