1

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) 
glennsl
  • 28,186
  • 12
  • 57
  • 75
Elissi
  • 312
  • 2
  • 8

1 Answers1

1

Reason syntax for modulus is "mod".

Js.log(20 mod 2)
glennsl
  • 28,186
  • 12
  • 57
  • 75
Elissi
  • 312
  • 2
  • 8
  • 1
    Documented here: https://reasonml.github.io/api/Pervasives.html#VAL(mod). The parentheses means it's an infix operator definition. – glennsl Aug 16 '21 at 07:31