How do I use modulus operator in Reason React?

368 Views Asked by At

When using the % operator in reason react I am left with an error "The value % can't be found". Is there another word for % used in Reason react?

Js.log(20 % 2) 
1

There are 1 best solutions below

1
On

Reason syntax for modulus is "mod".

Js.log(20 mod 2)