postdecrement
The postdecrement operator, commonly written as x--, is a postfix unary operator found in many programming languages. It decreases the value of its operand by 1 while returning the operand's original value.
In languages such as C, C++, Java, and JavaScript, the operator is applied as a side effect
Examples: int i = 5; int a = i--; // a becomes 5, i becomes 4. In an array access,
Precedence and evaluation: Postfix decrement generally binds tightly in expressions, higher than most binary operators, and
Usage notes and pitfalls: In C/C++, using i-- in the same expression as other reads or writes
Other languages: not all languages include a postdecrement operator. Python, for example, does not have i--. Some
---