DEV Community

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

Collapse
 
sreramk profile image
Sreram K • Edited

I am a beginner to JavaScript, but from reading this I think it will be unacceptable to not use semicolon whenever possible!

It makes sense to omit semicolon in a language like python as every line break functions as a statement terminator. But if the statement termination is being inferred from the grammar rules, this is where you must ask: why is this even allowed in the first place?

Collapse
 
eterychan profile image
Eternia • Edited

Your reason is one which makes sense the most; by comparing it with Python. I can live without semicolons if the language I am using disregard them to begin with. But if the language actually needs them and the interpreter adds them for me by following three simple rules; I would rather add them myself!