Additive operator (Definition)

An operator that adds or subtracts values.

Availability:

ECMAScript edition - 2

Here is a table summarizing all operators that can be classified as additive, even those which are primarily classified in other categories:

ValueMeaning
+Add
-Subtract
+=Add and assign
-=Subtract and assign
++Increment
--Decrement

Additive operators perform numeric addition and subtraction or string concatenation depending on the native type of the operands.

It might seem perverse to call a subtraction symbol an additive operator, but the word additive is used in the same context as multiplicative when talking about division. That is, a negative value is added to perform subtraction. It's all about the kind of logic used in the interpreter kernel.

See also:Add (+), Add then assign (+=), Arithmetic operator, Associativity, Decrement value (--), Increment value (++), Negation operator (-), Operator, Operator Precedence, Positive value (+), Postfix expression, Prefix decrement (--), Prefix expression, Prefix increment (++), String concatenate (+), String operator, Subtract (-), Subtract then assign (-=)

Cross-references:

ECMA 262 edition 2 - section - 11.6

ECMA 262 edition 3 - section - 11.6