This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

6

+1 Although when you say apart from subjective visual perception I feel you are trying to downplay the importance of sound coding conventions. Because what are coding convention if not helping others to understand your code by appealing to subjective visual perception?
–
flybywireMar 8 '10 at 7:58

flybywire, good point, but I just didn't want to get this question closed by SO mods as they already did that to the one I opened on python. Hope you do understand.
–
ArtMar 8 '10 at 8:04

5 Answers
5

Because JavaScript does nasty things to you when it guesses where to put semicolons. It's better to be explicit and let the interpreter know exactly what you meant than it is to let the idiot box guess on your behalf.

What a terrible answer. JavaScript interpreters never "guess" where to put a semicolon. Developers might "guess" at the rules of ASI, but that's never a good idea. A developer should understand the language they use.
–
the systemMar 1 '13 at 19:10

Put a ; (semicolon) at the end of every simple statement. Note that an assignment statement which is assigning a function literal or object literal is still an assignment statement and must end with a semicolon.