Advertisement
-Annie-

OddOrEven

May 24th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function oddEven(num) {
  2.   let rem = num % 2
  3.   if (rem == 0)
  4.   console.log("even")
  5.   else if (rem == Math.round(rem))
  6.   console.log("odd")
  7.   else console.log("invalid")
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement