Expression Statement
An expression statement is a simple expression that ends in a semicolon (;
) and
evaluates one or more expressions, without the involvement of any other statements.
Syntax
Examples
Common examples of expression statements are with increment or decrement expressions (
val++
/val--
) that simply add or subtract 1
to/from a value.
These often do not require any other expressions, and can simply be used as a whole statement, like
this: