Back

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

Can anyone tell me how to implement the below in JavaScript?

  1. The whole number of times a given integer goes to the other. 

  2. How to get the remainder? 

1 Answer

0 votes
by (19.7k points)

You can see the code below to compute the quotient and remainder for a number ‘y’ and a divisor ‘x’:

var quotient = Math.floor(y/x);

var remainder = y % x;

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

Related questions

0 votes
1 answer
asked Aug 30, 2019 in Python by Sammy (47.6k points)
0 votes
0 answers
asked Feb 17, 2021 in Java by Harsh (1.5k points)
0 votes
1 answer
0 votes
1 answer
asked Feb 18, 2021 in Python by laddulakshana (16.4k points)

Browse Categories

...