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
29.2k12 gold badges60 silver badges80 bronze badges
asked Aug 16, 2021 at 7:27

1 Answer 1

2

Reason syntax for modulus is "mod".

Js.log(20 mod 2)
glennsl
29.2k12 gold badges60 silver badges80 bronze badges
answered Aug 16, 2021 at 7:30
Sign up to request clarification or add additional context in comments.

1 Comment

Documented here: reasonml.github.io/api/Pervasives.html#VAL(mod). The parentheses means it's an infix operator definition.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.