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

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

c# - Search and Add Comment with OpenXML for Word -