Things to Know about JavaScript Syntax

Before getting too deep into the core elements of the language, there are a few things a programmer should know about JavaScript syntax. Understanding these points will get you up and programming in a more timely fashion.

The Semicolon

If you have done any programming in C, C++, or Java, even as simple as a Hello World program, you already know 75% of all there is to know about the JavaScript semicolon (;). Just like C and C++, the semicolon is placed at the end of a piece of code to signify that the code between the semicolon and the beginning of the line should be executed before moving to the next portion of code. If you forget a semicolon at the end of a line in C++, you get compile errors, but JavaScript ...

Get Pure JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.