Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (9.5k points)

Can anyone tell me how to use the modulo operator (%) to calculate numbers in JavaScript projects? 

1 Answer

0 votes
by (19.7k points)

(%) is a remainder operator which gets the remainder after integer division. See the below operation: 

10 % 3 // = 1 ; because 3 * 3 gets you 9, and 10 - 9 is 1.

It doesn’t work the same way as the modulo operator totally.

Interested in Java? Check out this Java Certification by Intellipaat. 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Mar 2, 2021 in Java by sheela_singh (9.5k points)
0 votes
1 answer

Browse Categories

...