Prefix decrement (--) (Operator/prefix)

Decrement an operand before access.

Availability:

ECMAScript edition - 2
JavaScript - 1.0
JScript - 1.0
Internet Explorer - 3.02
Netscape - 2.0
Property/method value type:Number primitive
JavaScript syntax:---anOperand
Argument list:anOperandA numeric value that can be decremented

The operand is evaluated, converted to a numeric value, and decremented by 1.

Although this is classified as a unary operator, its functionality is really that of an additive operator.

The associativity is from right to left.

Refer to the operator precedence topic for details of execution order.

See also:Additive operator, Arithmetic operator, Associativity, Decrement value (--), Operator Precedence, Postfix decrement (--), Prefix expression, Prefix operator, Unary expression

Cross-references:

ECMA 262 edition 2 - section - 11.4.5

ECMA 262 edition 2 - section - 11.6.3

ECMA 262 edition 3 - section - 11.4.5