Syntax Lookup

Enter some language construct you want to know more about.

/

This is the unified division operator.

Since ReScript 12, / works with int, float, and bigint. The compiler specializes the operator from its operands.

Integer division truncates the result to an integer. Dividing an integer by zero throws a Division_by_zero exception.

ReScriptJS Output
let intResult = 3 / 2
let floatResult = 3.0 / 2.0

References