The basic syntax rules for JavaScript

            JavaScript is case-sensitive.

            JavaScript statements end with a semicolon.

            JavaScript ignores extra whitespace in statements.

            Single-line comments begin with two forward slashes.

            Multi-line comments begin with /* and end with */.

 

 

A single-line comment

nextYear = thisYear + 1; // Add 1 to this year

A multi-line comment

/* The following line determines what the

   next year is by adding 1 to the current year

*/

nextYear = thisYear + 1;