Statements

Expression statement

Try the free JavaScript compiler

An expression statement evaluates an expression in statement position. Some expressions have grammatical restrictions in this position. Use parentheses when needed; an expression statement is not the same as a return statement.

Formal Syntax & Structure

javascript syntaxjavascript
expression;

Working Example

Example Snippetjavascript
console.log(7);
JavaScript Reference