Ad
Code
Diff
  • const evenOrOdd = (number = prompt("Enter a number: ")) => `The number is ${number % 2 ? "even" : "odd"}.`;
    • const evenOrOdd = (number = prompt("Enter a number: ")) => (number % 2) == 0 ? "The number is even." : "The number is odd.";
    • const evenOrOdd = (number = prompt("Enter a number: ")) => `The number is ${number % 2 ? "even" : "odd"}.`;