+ 5
What is modulus (%) in JS ?
3 RĂ©ponses
+ 14
Maybe this exemples help you :
â 5%2 =1 Explain : 2Ă2Ă2=6 but 6>5 So we put just 2Ă2=4 So ăă5-4=1 >
â 10%3 =4 Explain : 3Ă2Ă2 =12 but 12 >10 so we put just 3Ă2=6 ăă10-6=4
â 30%3 = 6 Explain : 3Ă2Ă2Ă2 = 24 ăă30-24=6
+ 7
modulus is the remainder after the division performed..đđđđ