Divisi JavaScript Euclidienne

var quotient = Math.floor(y/x);
var remainder = y % x;
Prickly Penguin