Answers for "const evenOrOdd = (number) => { // TODO: this should return "even" if the number is even, "odd" otherwise if (number % 2 === 0) { return "even"; // eslint-disable-next-line no-else-return } else { return "odd"; } }; in one line"

0

const evenOrOdd = (number) => { // TODO: this should return "even" if the number is even, "odd" otherwise if (number % 2 === 0) { return "even"; // eslint-disable-next-line no-else-return } else { return "odd"; } }; in one line

const evenOrOdd = (number) => {
  // TODO: this should return "even" if the number is even, "odd" otherwise
  if (number % 2 === 0) {
    return "even";
  // eslint-disable-next-line no-else-return
  } else {
    return "odd";
  }
};
Posted by: Guest on October-26-2020

Code answers related to "const evenOrOdd = (number) => { // TODO: this should return "even" if the number is even, "odd" otherwise if (number % 2 === 0) { return "even"; // eslint-disable-next-line no-else-return } else { return "odd"; } }; in one line"

Code answers related to "Javascript"

Browse Popular Code Answers by Language