javascript division integer 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: javascript two character integer
var myNumber = 7;
var formattedNumber = ("0" + myNumber).slice(-2);
console.log(formattedNumber);