Arithmetic Operators
Get introduced to arithmetic operators in Dart.
A list of operators
Arithmetic operators are operators that perform arithmetic operations such as addition and subtraction. Below is a list of the arithmetic operators supported by Dart.
Operator | Use |
---|---|
+ |
Adds two operands |
- |
Subtracts the second operand from the first |
- expr |
Reverses the sign of the expression (unary minus) |
* |
Multiplies both operands |
/ |
Divides the first operand by the second operand |
~/ |
Divides the first operand by the second operand |