Using Semicolons in JavaScript
Hi Luis,
Thanks for reaching out!
I use a linter called standard.js, which actually complains when I use semicolons.
They link to a couple of posts and videos about why someone may not choose to use semicolons. I’ll link to them here:
Basically, semicolon usage is really controversial in JS, and I think that a good rule of thumb is to decide what your preference is. Then if you’re in a situation where you need to follow a style guide follow that style guide like your life depends on it!
When I’m doing side projects I prefer to write code without semicolons, but it’s really just personal preference. If the style guide at work enforces the use of semicolons (for example, the Airbnb style guide) I will always adhere to that.