Basic Operators
- C
- C++
- C#
- Java
- Rust
- Go
- Javascript
- Typescript
- Python
// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call
// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call
// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call
// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call
// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call
// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call
// Increment (By one)
a++; // Postfix - Takes effect after its call
++a; // Prefix - Takes effect before its call
// Decrement (By one)
a--; // Postfix - Takes effect after its call
--a; // Prefix - Takes effect before its call
// Increment
// No ++ operator. Use the addition assignment operator.
variable_name += 1;
// Decrement
// No -- operator. Use the subtraction assignment operator.
variable_name -= 1;
// Increment
variableName++
// Decrement
variableName--
// Go does not support prefix increment/decrement.
// ++variableName // Not Available
// --variableName // Not Available
// Increment
variableName++;
++variableName;
// Decrement
variableName--;
--variableName;
// Increment
variableName++;
++variableName;
// Decrement
variableName--;
--variableName;
# Increment
# Not Available. You need to use the Addition Operator
a = a + 1
# Decrement
# Not Available. You need to use the Subtraction Operator
a = a - 1