Pre-Decrement : Prefix operator « Operators « JavaScript Tutorial






The pre-decrement operator (--) is placed to the left of a variable.

The pre-decrement operator decrements the value by 1.

If the variable is a string, it is converted to a number.

2.3.Prefix operator
2.3.1.Pre-Increment
2.3.2.Pre-Decrement
2.3.3.Prefix operator: ++
2.3.4.Prefix operator 2: --