Post-Decrement : Postfix operator « Operators « JavaScript Tutorial






The post-decrement operator (--) is placed to the right of a variable.

The post-decrement operator decrements the value by 1.

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

2.2.Postfix operator
2.2.1.Post-Increment
2.2.2.Post-Decrement
2.2.3.Postfix operator: ++
2.2.4.Postfix operator 2: --