popovIliya

March-2022-Conditional Statements - Lab -Even or Odd

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