Constant expression (Definition)

A constant expression is a combination of constants and an operator.

A constant expression can always be degenerated to a simpler constant form.

For example 100 + 101 is a constant expression, but could be replaced by the value 202.

A constant expression involving strings is "abcdef" + "ABCDEF". This yields the result "abcdefABCDEF".


See also:Arithmetic constant, Character constant, Constant, Date constant, Escape sequence (\), Expression, Expression statement, Floating constant, Floating-point constant, Initialization, Integer constant, JavaScript language, Logical constant, Object constant