Does JavaScript code run fine even if we don't use semicolon at the end of a statement?(I'm a beginner)

3/28/2020 2:00:32 PM

Sagar Thapaliya

4 Answers

New Answer


It means it is better to use semicolon??


You can omit semicolon in *certain cases* because javascript does automatic semicolon insertion. Read : https://codeburst.io/ecmascript-automatic-semicolon-insertion-50f09091e377


Thanks 🇮🇳Omkar🕉 👍👍😁


Sagar Thapaliya , Yes. You should use semicolon even if you know it'll be automatically inserted. It's considered as good practice to use semicolon in JS.