Division operation
Learn how to divide a value by another.
The division operation divides one numeric value by another and returns the quotient.
To use the division operator, place a / sign between two numeric values:
/*<operand>*/ / /*<operand>*/
For a more natural reading, you can alternatively write:
/*<operand>*/ divided by /*<operand>*/
Here is a practical example:
6 / 2 // 3
Note that division has the same precedence as multiplication, which is higher than addition and subtraction. This means that division is performed before those operations, as shown below:
2 + 6 / 2 // 5, not 4