DEV Community


Discussion on: Semicolons in JavaScript: To Use or Not to Use?

outlawgametools profile image
J. A. Whye

I know this is an older article, but I didn't want someone coming here, reading all the comments and thinking, "Oh, everybody uses semicolons, I guess I'd better..."

Not everybody does. Why type something you don't need to?

I program in C# for my job so am required to use semicolons at the end of the lines. But at home when I'm working on something in Lua, or Javascript, I skip the semicolons. They are generally NOT needed so I don't include them.

If your boss says you have to use them, then use them, but otherwise, why bother?

rapmendoza profile image
Rap Mendoza

Hey man, I understand your point - but doesn't it help if you have something less to think about, such as these rules, and focus on the things that actually matters? I mean you can predict better at what would happen in your code without thinking about such rules.

dlopez831 profile image
David Lopez (Argen.)

yes... Why bother writing comments if the compiler / interpreter ignores them?