Ad
Code
Diff
  • Number.prototype.evenOrOdd = function() {
      return (['Even', 'Odd', 'Not an integer'][!Number.isInteger(this.valueOf()) ? 2 : this.valueOf() & 1]);
    }
    • Number.prototype.evenOrOdd = function() {
    • return (['Even', 'Odd'][this%2])||'Not an integer'
    • return (['Even', 'Odd', 'Not an integer'][!Number.isInteger(this.valueOf()) ? 2 : this.valueOf() & 1]);
    • }