id | keywords | name | summary | category | ||||
---|---|---|---|---|---|---|---|---|
integer-division |
| / | This is the `integer division` operator. | operators |
This operator performs integer division, with the result truncated to an integer value.
If the second argument is zero then a Division_by_zero
exception is thrown. Refer to the Exception section for handling exceptions.
<CodeTab labels={["ReScript", "JS Output"]}>
letresult=3/2
varresult=1;
For dividing floats see the /.
operator.