Skip to content

Latest commit

 

History

History
25 lines (18 loc) · 589 Bytes

operators_integer_division.mdx

File metadata and controls

25 lines (18 loc) · 589 Bytes
idkeywordsnamesummarycategory
integer-division
divide
division
int
integer
/
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.

close