[Edit]
+
0
-
0
js perform integer division and separately get remainder
1 2 3 4 5 6 7 8const x = 5; const y = 2; const quotient = Math.floor(x/y); const remainder = x % y; console.log(quotient); // 2 console.log(remainder); // 1
1 2 3 4 5 6 7 8const x = 5; const y = 2; const quotient = Math.floor(x/y); const remainder = x % y; console.log(quotient); // 2 console.log(remainder); // 1