Most lines of code start with a keyword or command, for example var, for or function.
Simple commands with single lines of code, end with a semicolon.
More complex commands require blocks of code. Blocks of code are surrounded by curly brackets. The commands for, while and if, all require blocks of code.
Code is treated as one line. So semicolons are the only way to know when one command ends and another starts. This code has two different commands, and is still valid on just one line.
Arithmetic and mathematical formula can be calculated.
Some values have sub values and sub functions. These can be accessed by adding a point between the value and the sub value or function.