Here you can find the source of isDevisor(num)
Number.prototype.isDevisor = function (num) { var ans = false; if ((this / num).isInteger()) { ans = true;//w w w . j a v a 2s . c o m } return ans; }
Number.prototype.divisors = function () { "use strict"; var ans = [], max = this; for (let i = 1; i < max; i += 1) { if (max.isDivisor(i)) { ans.push(i); if (ans.length > 30) { console.log("amount " + ans.length); ans.push(max.valueOf()); return ans; };
Number.prototype.isDivisibleBy = function(divisor) { if (this == 0) return false; return this % divisor === 0; };
Number.prototype.isDivisor = function (num) { "use strict"; var ans = false; if ((this / num).isInteger()) { ans = true; return ans; };
Number.prototype.isDivisor = function(num){ var ans = false; if((this/num).isInteger()){ ans = true; return ans;
Number.prototype.isDivisor = function (num) { var ans = false; if ((this / num).isInteger()) { ans = true; return ans; Number.prototype.divisors = function () { var ans = []; ...