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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -