What is modulus (%) in JS ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

What is modulus (%) in JS ?

29th Jan 2018, 12:00 PM
Yash Agarwal
Yash Agarwal - avatar
3 Answers
+ 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
29th Jan 2018, 12:33 PM
Youssef Ouamou
Youssef Ouamou - avatar
29th Jan 2018, 12:01 PM
Vukan
Vukan - avatar
+ 7
modulus is the remainder after the division performed..😉😉😀😊
29th Jan 2018, 5:54 PM
Jaydeep Khatri
Jaydeep Khatri - avatar