get divisor and remainder js code example Example: getting the qoutient of a number in javascript var div = Math.trunc(y/x); var rem = y % x;