Skip to content
← Back to glossary

式Expression

Learn in the textbookExpressions, Assignment, and Comments

DefinitionAn expression (式) is a piece of code that yields a single value when it is evaluated (評価).

ExplanationEvaluation means calculating an expression to get its value. A variable (変数) is a named container that holds a value, and inside an expression it stands for whatever value it holds at that moment. The typical form joins values or variables with operators, but a single number or a single variable on its own is also an expression.

AnalogyIt is like a calculation keyed into a calculator: press the equals key and exactly one answer appears.

Memory hookIn English it is an expression: something that "expresses" the one value the calculation produces.