how to get remaineder in JS code example
Example 1: javascript division get remainder
var y=11;
var x=4;
var quotient = Math.floor(y/x); //2
var remainder = y % x; //3
Example 2: modulus js
console.log(10%3);
//returns 1 (the remainder of 10/3)
var y=11;
var x=4;
var quotient = Math.floor(y/x); //2
var remainder = y % x; //3
console.log(10%3);
//returns 1 (the remainder of 10/3)