GLOSSARY · A WORD, UNPACKED
statement
a complete instruction that performs an action, like declaring a variable or running a loop.
A little more detail
Statements organize what the program does and which path it follows. if and for are statements; a calculation such as 2 + 2 is an expression. An expression can also be used as an expression statement, as with a function call written as a complete step. The distinction helps explain why some syntax fits where a value is expected and some does not.
See it in practice
These lessons pair the idea with examples you can change and run.