Also, I don't understand how adding a semicolon could help against the "stupid error" you cite. Could anyone please explain ?
Also, I don't understand how adding a semicolon could help against the "stupid error" you cite. Could anyone please explain ?
If you always put semicolons to mark the end of a statement, then seeing a statement without one would be like seeing a megablocks brick in your lego box - glaringly obvious and extremely offensive.
IMHO that backeting style sucks, and shouldn't be used, at least in js.
I am certainly not against coding practices or readability. With (Q)BASIC, you could also add semicolons and have multiple statements per line, but who did ? It seems that it is the same with Javascript, semicolons are separators between statements, as well as newlines : why write both ? just to be sure they are well separated ?
Why force yourself to remember edge cases, when you can just remove that whole class of bugs by being explicit about what you mean...