One easy way to get started at programming in JavaScript is
to interact with the JavaScript interpreter that is built into
the browser you are using to view this page.
JavaScript programs are called *statements*.
We have set up the statements shown with a dark background such that
you can click on them.
The mouse click on JavaScript statements is
programmed in such
a way that a JavaScript interpreter is displayed, which can
*evaluate* the
statement and display the resulting value.
By the way, the program that makes the mouse click
on a JavaScript statement display the interpreter is itself
written in JavaScript; we call it the *script* for
the mouse click.

One kind of statement is an
expression statement, which consists of an
*expression*, followed by a semicolon.
A simple kind of an expression is a number.
(More precisely, the expression consists of the numerals that
represent the number in base 10.) If you ask our script to
display the interpreter for the expression statement

486;

Expressions representing numbers may be combined with operators
(such as
`+` or
`*`) to form a
compound expression that represents the
application of a corresponding primitive
function to those numbers. For example, evaluate
any of the following expression statements[1]
by clicking on it:

137 + 349;

1000 - 334;

5 * 99;

10 / 5;

2.7 + 10;

Expressions such as these, which contain other expressions
as components, are called *combinations*.
Combinations that are formed by an
*operator* symbol in the middle, and
*operand* expressions to the left and right of it,
are called
*operator combinations*.
The value of an operator combination is
obtained by applying the function specified by the operator to the
*arguments* that are the values of the operands.

The convention of placing the operator between the operands is
known as
*infix notation*.
It follows
the mathematical notation that the reader is most
likely familiar with from school and everyday life.
As in mathematics, operator combinations can
be *nested*, that is, they
can take arguments that themselves are operator combinations:

(3 * 5) + (10 - 6);

3 * 5 + 10 / 2;

(3 * 5) + (10 / 2);

3 / 5 * 2 - 4 + 3;

(((3 / 5) * 2) - 4) + 3;

There is no limit (in principle) to the depth of such nesting and to the overall complexity of the expressions that the JavaScript interpreter can evaluate. It is we humans who might get confused by still relatively simple expressions such as

3 * 2 * (4 + (3 - 5)) + 10 * (27 / 6);

3 * 2 * (4 + (3 - 5)) + 10 * (27 / 6);

The interpreter always operates in the
same basic cycle: It reads a statement from the browser,
evaluates the statement, and prints the result.
This mode of operation is often expressed by saying that the
interpreter runs in a
*read-eval-print loop*.
Observe in particular that it is not necessary to explicitly
instruct the interpreter to print the value of the
statement.

[1]
Note that the semicolon indicates to the JavaScript interpreter
that the expression should be taken as a statement, and thus as
a complete program. However, JavaScript systems are not strict
about these semicolons; they can often be left out. In this book,
we will never leave out these optional semicolons, and point out
which statements come with semicolons and which ones don't.

1.1.1 Expressions