Sign in Go Pro

Beginning JavaScript for React Native

Using Semicolons


Up next



Using or not using semicolons in JavaScript can be confusing - because some programmers are very opinionated one way or the other, so there are examples of good code written both with, and without semicolons.

JavaScript has "automatic semicolon insertion" which will automatically take care of inserting semicolons in your code - but there may be side effects if you're unaware of the automatic insertion rules.

In the end, you and your team will have to decide if you use semicolons sometimes, all the time, or never.

Summary of Content:

  • Automatic semicolon insertion
  • Example of an error because of the lack of semicolons
  • Example of an error because of automatic semicolon insertion




There are no comments on this lesson, start the conversation below ...

You need to go PRO to post comments.

Lessons in Beginning JavaScript for React Native