Here you can find the source of compareTo(other)
Number.prototype.compareTo = function (other) { return this.valueOf() == other; };
Number.prototype.compareTo = function(num) { if (typeof num != "number") return false; if (num < this) return 1; else if (num > this) return -1; else return 0; };
Number.prototype.compareTo = function (other: number) { return this.valueOf() == other;
Number.prototype.compare_number = function (generated_number, input_number) { var number_of_A = 0; var number_of_B = 0; for (var i=0; i<4; i++){ for (var j=0; j<4; j++){ if ((generated_number[i] == input_number[j]) && i==j){ number_of_A += 1; else if ((generated_number[i] == input_number[j]) && i!=j){ ...