javascript - Modulo operator -
9%4 = 1
1%4 , answer 1
2%4 , answer 2
answer found. - closed.
the meaning of mod take remainder after doing division.
1 fits 0 times in 4, remainder 1.
here wikipedia definition explains in little more detail:
in mathematics result of modulo operation remainder of arithmetic division. known, arithmetic division of 2 integers produces quotient , remainder.
Comments
Post a Comment