+ 5
What is modulus (%) in JS ?
3 odpowiedzi
+ 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..😉😉😀😊