Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function oddEven(num) {
- let rem = num % 2
- if (rem == 0)
- console.log("even")
- else if (rem == Math.round(rem))
- console.log("odd")
- else console.log("invalid")
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement