How do I use modulus operator in Reason React?

Viewed 104

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 Answers

Reason syntax for modulus is "mod".

Js.log(20 mod 2)
Related