Expression statements

An expression statement simply evaluates an expression.

Usage

An expression statement is just the expression followed by a semicolon (;).

foo();

Description

No all expressions can be treated as statements in this way. For example:

"";

On execution, the expression's value is discarded.

See also