Last active
December 16, 2023 08:58
-
-
Save luislobo14rap/cffe6c8347679304bba888b77590ad1b to your computer and use it in GitHub Desktop.
odd-or-even.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // odd-or-even.js v1 | |
| function oddOrEven(number_){ // 0 = even, 1 = odd | |
| return number_ % 2 === 0 ? 0 : 1; | |
| }; | |
| // is-odd.js v1 | |
| function isOdd(number_){ | |
| return number_ % 2 !== 0; | |
| }; | |
| // is-even.js v1 | |
| function isEven(number_){ | |
| return number_ % 2 === 0; | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment