Advertisement
Didart

Even Or Odd

Mar 5th, 2022
875
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function evenOrOdd(input) {
  2.     let number = Number(input[0]);
  3.  
  4.     if (number % 2 == 0) {
  5.         console.log("even");
  6.     } else {
  7.         console.log("odd");
  8.     }
  9. }
  10.  
  11. evenOrOdd(["2"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement