javascript integer division code example
Example 1: divide intagers javascript
var quotient = Math.floor(y/x);
var remainder = y % x;
Example 2: javascript division get remainder
var y=11;
var x=4;
var quotient = Math.floor(y/x); //2
var remainder = y % x; //3
Example 3: integer division javascript
var quotient = Math.floor(y/x);
var remainder = y % x;
Example 4: integer division javascript
var div = Math.trunc(y/x);
var rem = y % x;