...

/

Understanding Statements

Understanding Statements

Learn about expressions and their order of operations.

Statements and expressions

In many programming languages, the sequence of code that we write is made up of what are called statements. A statement expresses some action to be carried out and is made up of several internal components. These are called expressions.

Statements are made up of expressions, and expressions are made up of even smaller parts. Let’s refer to an example:

5 + 4
Adding two numbers

This is an expression made up of three parts. Here, we’re using the addition operator, +. On both sides of the operator, we have the operands in the form of two constant values, 5 and 4. A statement can be made up of more than one expression. ...