divide intagers javascript

JavaScript
var quotient = Math.floor(y/x);
var remainder = y % x;
Source

Also in JavaScript: