Advertisement
Spocoman

03. Even or Odd

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