JavaScript Statements

Statements are separated by semicolons.

In the script below, the first statement declares the variables x, y, and z.

The second statement assigns the literal value 5 to x.

The third statement assigns the literal value 6 to y.

Then x an y are added and assigned to z.

Finally the value of z is displayed in the paragraph below: