Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 443 Bytes

operators_integer_division.mdx

File metadata and controls

21 lines (14 loc) · 443 Bytes
test
foo

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"]}>

let result = 3 / 2
var result = 1;

For dividing floats see the /. operator.