skip to content
Dev Journal

Semicolons

/ 1 min read

You Don’t Need Semicolons

There’s a common belief in some books and tutorials that you must end every JavaScript statement with a semicolon. Some people even argue that omitting them makes you a bad developer.

But here’s the thing: I don’t use semicolons at the end of my JavaScript lines, and there’s a reason for that.

Semicolons Are Optional

JavaScript has a built-in feature that automatically adds semicolons for you. This means you don’t actually need to include them yourself. You can still write clean, effective JavaScript without them.

In fact, many experts believe that skipping semicolons can make your code more readable and easier to write. If you’re curious about the reasoning behind this, I’d recommend diving into this article. It’ll give you a clearer picture of why semicolons might not be as necessary as you think.

Have a read and you’ll understandy why