YESSSSS.
JavaScript inserts semicolons for you automatically. That’s why it’s optional to write semicolons. You don’t need semicolons to write good JavaScript.
In fact, it’s easier to read and write JavaScript when you leave out the semicolons. Many experts have already done so. I’d leave the explaining of why you don’t need semicolons to this
Happy Learning
Top comments (2)
Suppose you wanted to write
But write instead this:
BIG difference!
My recommandation: you, as a developer, know where your statement ends, so use a semicolon to mark this end, don't let the JS engine decide for you.
I still prefer writing semicolons
Maybe I'm more familiar with Java so I think the code looks more clear
And that's why I don't like Python
¯_(ツ)_/¯